public abstract class LongObjectCacheBase<V> extends CacheHitRateable
| Modifier and Type | Class and Description |
|---|---|
static interface |
LongObjectCacheBase.CriticalSection |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_SIZE |
static int |
MIN_SIZE |
protected int |
size |
| Modifier | Constructor and Description |
|---|---|
protected |
LongObjectCacheBase(int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
adjustHitRate() |
abstract V |
cacheObject(long key,
V x) |
abstract void |
clear() |
boolean |
containsKey(long key) |
abstract int |
count() |
V |
get(long key) |
abstract V |
getObject(long key) |
boolean |
isCached(long key) |
boolean |
isEmpty() |
abstract void |
lock() |
LongObjectCacheBase.CriticalSection |
newCriticalSection() |
V |
put(long key,
V value) |
abstract V |
remove(long key) |
int |
size() |
abstract V |
tryKey(long key) |
V |
tryKeyLocked(long key) |
abstract void |
unlock() |
close, getAttempts, getCacheAdjuster, getHits, hitRate, incAttempts, incHits, setAttempts, setHitspublic static final int DEFAULT_SIZE
public static final int MIN_SIZE
protected final int size
public boolean isEmpty()
public boolean containsKey(long key)
public V get(long key)
public V tryKeyLocked(long key)
public abstract void clear()
public abstract void lock()
public abstract void unlock()
public abstract V remove(long key)
public abstract V tryKey(long key)
public abstract V getObject(long key)
public boolean isCached(long key)
public abstract int count()
public int size()
public void adjustHitRate()
adjustHitRate in class CacheHitRateablepublic LongObjectCacheBase.CriticalSection newCriticalSection()