public class FeatureCacheTables extends Object
| Constructor and Description |
|---|
FeatureCacheTables()
Constructor, created with cache size of
FeatureCache.DEFAULT_CACHE_MAX_SIZE |
FeatureCacheTables(int maxCacheSize)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all caches
|
void |
clear(String tableName)
Clear the feature table cache
|
void |
clearAndResize(int maxCacheSize)
Clear and resize all caches and update the max cache size
|
void |
clearAndResize(String tableName,
int maxCacheSize)
Clear and resize the feature table cache
|
FeatureRow |
get(String tableName,
long featureId)
Get the cached feature row by table name and feature id
|
FeatureCache |
getCache(FeatureRow featureRow)
Get or create a feature row cache for the feature row
|
FeatureCache |
getCache(String tableName)
Get or create a feature row cache for the table name
|
int |
getMaxCacheSize()
Get the max cache size used when creating new feature row caches
|
int |
getMaxSize(String tableName)
Get the cache max size for the table name
|
int |
getSize(String tableName)
Get the current cache size, number of feature rows cached, for the table name
|
Set<String> |
getTables()
Get the feature table names with a feature row cache
|
FeatureRow |
put(FeatureRow featureRow)
Cache the feature row
|
FeatureRow |
remove(FeatureRow featureRow)
Remove the cached feature row
|
FeatureRow |
remove(String tableName,
long featureId)
Remove the cached feature row by id
|
void |
resize(int maxCacheSize)
Resize all caches and update the max cache size
|
void |
resize(String tableName,
int maxCacheSize)
Resize the feature table cache
|
void |
setMaxCacheSize(int maxCacheSize)
Set the max cache size to use when creating new feature row caches
|
public FeatureCacheTables()
FeatureCache.DEFAULT_CACHE_MAX_SIZEpublic FeatureCacheTables(int maxCacheSize)
maxCacheSize - max feature rows to retain in each feature table cachepublic int getMaxCacheSize()
public void setMaxCacheSize(int maxCacheSize)
maxCacheSize - feature row max cache sizepublic Set<String> getTables()
public FeatureCache getCache(String tableName)
tableName - feature table namepublic FeatureCache getCache(FeatureRow featureRow)
featureRow - feature rowpublic int getMaxSize(String tableName)
tableName - feature table namepublic int getSize(String tableName)
tableName - feature table namepublic FeatureRow get(String tableName, long featureId)
tableName - feature table namefeatureId - feature row idpublic FeatureRow put(FeatureRow featureRow)
featureRow - feature rowpublic FeatureRow remove(FeatureRow featureRow)
featureRow - feature rowpublic FeatureRow remove(String tableName, long featureId)
tableName - feature table namefeatureId - feature row idpublic void clear(String tableName)
tableName - feature table namepublic void clear()
public void resize(String tableName, int maxCacheSize)
tableName - feature table namemaxCacheSize - max cache sizepublic void resize(int maxCacheSize)
maxCacheSize - max cache sizepublic void clearAndResize(String tableName, int maxCacheSize)
tableName - feature table namemaxCacheSize - max cache sizepublic void clearAndResize(int maxCacheSize)
maxCacheSize - max cache size