public abstract class BaseCache<K,V> extends Object implements InternalCache<K,V>
Constructor and Description |
---|
BaseCache() |
Modifier and Type | Method and Description |
---|---|
ConcurrentMap<K,V> |
asMap() |
void |
clearAndClose() |
void |
closeCustomization(Object _customization)
Call close on the customization if the
Closeable interface
is implemented |
<T> T |
createCustomization(CustomizationSupplier<T> f)
Calls factory and wraps exceptions.
|
protected abstract <R> EntryAction<K,V,R> |
createEntryAction(K key,
Entry<K,V> e,
Semantic<K,V,R> op) |
Iterable<CacheEntry<K,V>> |
entries() |
protected <R> R |
execute(K key,
Entry<K,V> e,
Semantic<K,V,R> op) |
protected <R> R |
execute(K key,
Semantic<K,V,R> op) |
protected <R> R |
execute(Semantic<K,V,R> op,
EntryAction<K,V,R> _action) |
SimpleCacheEntry<K,V> |
getSimpleEntry(K key) |
StorageAdapter |
getStorage() |
StorageMetrics |
getStorageMetrics()
Return storage metrics if storage attached.
|
<R> Map<K,EntryProcessingResult<R>> |
invokeAll(Iterable<? extends K> keys,
EntryProcessor<K,V,R> entryProcessor) |
protected abstract Iterator<CacheEntry<K,V>> |
iterator() |
Iterable<K> |
keys()
Key iteration on top of normal iterator.
|
SimpleCacheEntry<K,V> |
peekSimpleEntry(K key) |
void |
removeAll() |
void |
removeAll(Iterable<? extends K> _keys) |
<X> X |
requestInterface(Class<X> _type) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cancelTimerJobs, expireOrScheduleFinalExpireEvent, getClock, getCommonMetrics, getEntryState, getInfo, getKeyType, getLatestInfo, getLog, getName, getTotalEntryCount, getValueType, isNullValuePermitted, logAndCountInternalException, replaceOrGet, timerEventExpireEntry, timerEventProbationTerminated, timerEventRefresh
clear, close, computeIfAbsent, containsAndRemove, containsKey, expireAt, get, getAll, getCacheManager, getEntry, invoke, isClosed, loadAll, peek, peekAll, peekAndPut, peekAndRemove, peekAndReplace, peekEntry, prefetch, prefetchAll, put, putAll, putIfAbsent, reloadAll, remove, removeIfEquals, replace, replaceIfEquals, toString
checkIntegrity
protected abstract Iterator<CacheEntry<K,V>> iterator()
public <X> X requestInterface(Class<X> _type)
requestInterface
in interface Cache<K,V>
public StorageAdapter getStorage()
getStorage
in interface InternalCache<K,V>
public <R> Map<K,EntryProcessingResult<R>> invokeAll(Iterable<? extends K> keys, EntryProcessor<K,V,R> entryProcessor)
protected abstract <R> EntryAction<K,V,R> createEntryAction(K key, Entry<K,V> e, Semantic<K,V,R> op)
public StorageMetrics getStorageMetrics()
InternalCache
getStorageMetrics
in interface InternalCache<K,V>
public <T> T createCustomization(CustomizationSupplier<T> f)
InternalCache
createCustomization
in interface InternalCache<K,V>
f
- factory or null. If null, then null is returned.public void closeCustomization(Object _customization)
InternalCache
Closeable
interface
is implementedcloseCustomization
in interface InternalCache<K,V>
public void clearAndClose()
clearAndClose
in interface Cache<K,V>
public SimpleCacheEntry<K,V> peekSimpleEntry(K key)
peekSimpleEntry
in interface Cache<K,V>
public SimpleCacheEntry<K,V> getSimpleEntry(K key)
getSimpleEntry
in interface Cache<K,V>
cache2k API documentation. Copyright © 2000–2018 headissue GmbH, Munich.