public abstract class ObjectCacheDecorator<K,V> extends ObjectCacheBase<K,V>
ObjectCacheBase.CriticalSectionDEFAULT_SIZE, MIN_SIZE, size| Constructor and Description |
|---|
ObjectCacheDecorator() |
ObjectCacheDecorator(int size) |
ObjectCacheDecorator(int size,
@NotNull java.util.function.BooleanSupplier shouldCache) |
| Modifier and Type | Method and Description |
|---|---|
V |
cacheObject(K key,
V x) |
void |
clear() |
void |
close() |
int |
count() |
protected abstract ObjectCacheBase<K,V> |
createdDecorated() |
int |
getAttempts() |
protected jetbrains.exodus.core.execution.SharedTimer.ExpirablePeriodicTask |
getCacheAdjuster() |
int |
getHits() |
V |
getObject(K key) |
float |
hitRate() |
protected void |
incAttempts() |
protected void |
incHits() |
void |
lock() |
ObjectCacheBase.CriticalSection |
newCriticalSection() |
V |
remove(K key) |
V |
tryKey(K key) |
void |
unlock() |
adjustHitRate, containsKey, formatHitRate, get, isCached, isEmpty, put, size, tryKeyLockedsetAttempts, setHitspublic ObjectCacheDecorator()
public ObjectCacheDecorator(int size)
public ObjectCacheDecorator(int size,
@NotNull
@NotNull java.util.function.BooleanSupplier shouldCache)
public void clear()
clear in class ObjectCacheBase<K,V>public void lock()
lock in class ObjectCacheBase<K,V>public void unlock()
unlock in class ObjectCacheBase<K,V>public V cacheObject(@NotNull K key, @NotNull V x)
cacheObject in class ObjectCacheBase<K,V>public int count()
count in class ObjectCacheBase<K,V>public void close()
close in class CacheHitRateablepublic int getAttempts()
getAttempts in class CacheHitRateablepublic int getHits()
getHits in class CacheHitRateablepublic float hitRate()
hitRate in class CacheHitRateablepublic ObjectCacheBase.CriticalSection newCriticalSection()
newCriticalSection in class ObjectCacheBase<K,V>protected void incAttempts()
incAttempts in class CacheHitRateableprotected void incHits()
incHits in class CacheHitRateable@Nullable protected jetbrains.exodus.core.execution.SharedTimer.ExpirablePeriodicTask getCacheAdjuster()
getCacheAdjuster in class CacheHitRateableprotected abstract ObjectCacheBase<K,V> createdDecorated()