public abstract class CacheSet<K,A,B>
extends java.lang.Object
Caches
, indexed by CacheKey
.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CACHE_CAPACITY |
Constructor and Description |
---|
CacheSet(java.util.List<K> keys) |
CacheSet(java.util.List<K> keys,
int size) |
CacheSet(java.util.List<K> keys,
java.util.List<java.lang.Integer> sizes) |
Modifier and Type | Method and Description |
---|---|
void |
addCache(K key) |
void |
addCache(K key,
int size) |
B |
cacheObject(K cacheKey,
POS pos,
A key,
B value) |
void |
clearCache(K key) |
void |
clearObject(K cacheKey,
POS pos,
A key) |
protected abstract POSCache<A,B> |
createCache(int size) |
POSCache<A,B> |
getCache(K cacheKey) |
long |
getCacheCapacity(K cacheKey) |
B |
getCachedObject(K cacheKey,
POS pos,
A key) |
int |
getCacheSize(K cacheKey) |
int |
getSize() |
void |
setCacheCapacity(K cacheKey,
int capacity) |
public static final int DEFAULT_CACHE_CAPACITY
public CacheSet(java.util.List<K> keys)
public CacheSet(java.util.List<K> keys, int size)
public CacheSet(java.util.List<K> keys, java.util.List<java.lang.Integer> sizes)
public void addCache(K key)
public void addCache(K key, int size)
public void clearCache(K key)
public int getCacheSize(K cacheKey)
public long getCacheCapacity(K cacheKey)
public void setCacheCapacity(K cacheKey, int capacity)
public int getSize()