GPKGFeatureCacheTables
Objective-C
@interface GPKGFeatureCacheTables : NSObject
Swift
class GPKGFeatureCacheTables : NSObject
Feature Row Cache for multiple feature tables in a single GeoPackage
-
Max Cache size
Declaration
Objective-C
@property (nonatomic) int maxCacheSize;
Swift
var maxCacheSize: Int32 { get set }
-
Initialize, created with cache size of GPKGFeatureCache DEFAULT_FEATURE_CACHE_MAX_SIZE
Declaration
Objective-C
- (instancetype)init;
Swift
init!()
Return Value
new feature cache tables
-
Initialize
Declaration
Objective-C
- (instancetype)initWithMaxCacheSize:(int)maxCacheSize;
Swift
init!(maxCacheSize: Int32)
Parameters
maxCacheSize
max feature rows to retain in each feature table cache
Return Value
new feature cache tables
-
Get the feature table names with a feature row cache
Declaration
Objective-C
- (NSArray<NSString *> *)tables;
Swift
func tables() -> [String]!
Return Value
feature table names
-
Get or create a feature row cache for the table name
Declaration
Objective-C
- (GPKGFeatureCache *)cacheForTable:(NSString *)tableName;
Swift
func cache(forTable tableName: String!) -> GPKGFeatureCache!
Parameters
tableName
feature table name
Return Value
feature row cache
-
Get or create a feature row cache for the feature row
Declaration
Objective-C
- (GPKGFeatureCache *)cacheForRow:(GPKGFeatureRow *)featureRow;
Swift
func cache(for featureRow: GPKGFeatureRow!) -> GPKGFeatureCache!
Parameters
featureRow
feature row
Return Value
feature row cache
-
Get the cache max size for the table name
Declaration
Objective-C
- (int)maxSizeForTable:(NSString *)tableName;
Swift
func maxSize(forTable tableName: String!) -> Int32
Parameters
tableName
feature table name
Return Value
max size
-
Get the cached feature row by table name and feature id
Declaration
Objective-C
- (GPKGFeatureRow *)rowByTable:(NSString *)tableName andId:(int)featureId;
Swift
func row(byTable tableName: String!, andId featureId: Int32) -> GPKGFeatureRow!
Parameters
tableName
feature table name
featureId
feature row id
Return Value
feature row or null
-
Cache the feature row
Declaration
Objective-C
- (GPKGFeatureRow *)putRow:(GPKGFeatureRow *)featureRow;
Swift
func put(_ featureRow: GPKGFeatureRow!) -> GPKGFeatureRow!
Parameters
featureRow
feature row
Return Value
previous cached feature row or null
-
Remove the cached feature row
Declaration
Objective-C
- (GPKGFeatureRow *)removeRow:(GPKGFeatureRow *)featureRow;
Swift
func remove(_ featureRow: GPKGFeatureRow!) -> GPKGFeatureRow!
Parameters
featureRow
feature row
Return Value
removed feature row or null
-
Remove the cached feature row by id
Declaration
Objective-C
- (GPKGFeatureRow *)removeRowByTable:(NSString *)tableName andId:(int)featureId;
Swift
func removeRow(byTable tableName: String!, andId featureId: Int32) -> GPKGFeatureRow!
Parameters
tableName
feature table name
featureId
feature row id
Return Value
removed feature row or null
-
Clear the feature table cache
Declaration
Objective-C
- (void)clearForTable:(NSString *)tableName;
Swift
func clear(forTable tableName: String!)
Parameters
tableName
feature table name
-
Clear all caches
Declaration
Objective-C
- (void)clear;
Swift
func clear()
-
Resize the feature table cache
Declaration
Objective-C
- (void)resizeForTable:(NSString *)tableName withMaxCacheSize:(int)maxCacheSize;
Swift
func resize(forTable tableName: String!, withMaxCacheSize maxCacheSize: Int32)
Parameters
tableName
feature table name
maxCacheSize
max cache size
-
Resize all caches and update the max cache size
Declaration
Objective-C
- (void)resizeWithMaxCacheSize:(int)maxCacheSize;
Swift
func resize(withMaxCacheSize maxCacheSize: Int32)
Parameters
maxCacheSize
max cache size
-
Clear and resize the feature table cache
Declaration
Objective-C
- (void)clearAndResizeForTable:(NSString *)tableName withMaxCacheSize:(int)maxCacheSize;
Swift
func clearAndResize(forTable tableName: String!, withMaxCacheSize maxCacheSize: Int32)
Parameters
tableName
feature table name
maxCacheSize
max cache size
-
Clear and resize all caches and update the max cache size
Declaration
Objective-C
- (void)clearAndResizeWithMaxCacheSize:(int)maxCacheSize;
Swift
func clearAndResize(withMaxCacheSize maxCacheSize: Int32)
Parameters
maxCacheSize
max cache size