public class FeatureRowCacheManager extends Object
| Constructor and Description |
|---|
FeatureRowCacheManager()
Constructor, created with cache size of
FeatureRowCache.DEFAULT_CACHE_SIZE |
FeatureRowCacheManager(int cacheSize)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all caches
|
void |
clear(String tableName)
Clear the feature table cache
|
FeatureRow |
get(String tableName,
long featureId)
Get the cached feature row by table name and feature id
|
FeatureRowCache |
getCache(FeatureRow featureRow)
Get or create a feature row cache for the feature row
|
FeatureRowCache |
getCache(String tableName)
Get or create a feature row cache for the table name
|
int |
getCacheSize()
Get the cache size used when creating new feature row caches
|
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 maxSize)
Resize all caches and update the cache size
|
void |
resize(String tableName,
int maxSize)
Resize the feature table cache
|
void |
setCacheSize(int cacheSize)
Set the cache size to use when creating new feature row caches
|
public FeatureRowCacheManager()
FeatureRowCache.DEFAULT_CACHE_SIZEpublic FeatureRowCacheManager(int cacheSize)
cacheSize - max feature rows to retain in each feature table cachepublic int getCacheSize()
public void setCacheSize(int cacheSize)
cacheSize - feature row cache sizepublic FeatureRowCache getCache(String tableName)
tableName - feature table namepublic FeatureRowCache getCache(FeatureRow featureRow)
featureRow - feature rowpublic 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 maxSize)
tableName - feature table namemaxSize - max sizepublic void resize(int maxSize)
maxSize - max size