public class WiredCache<K,V> extends BaseCache<K,V> implements StorageAdapter.Parent, HeapCacheListener<K,V>
HeapCacheListener.NoOperation<K,V>NO_OPERATION| Constructor and Description |
|---|
WiredCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelTimerJobs()
used from the cache manager for shutdown
|
void |
checkIntegrity()
Cache checks its internal integrity.
|
void |
clear() |
void |
close() |
V |
computeIfAbsent(K key,
Callable<V> callable) |
boolean |
containsAndRemove(K key) |
boolean |
containsKey(K key) |
protected <R> EntryAction<K,V,R> |
createEntryAction(K key,
Entry<K,V> e,
Semantic<K,V,R> op) |
void |
expireAt(K key,
long _millis) |
void |
expireOrScheduleFinalExpireEvent(Entry<K,V> e) |
V |
get(K key) |
Map<K,V> |
getAll(Iterable<? extends K> keys)
We need to deal with possible null values and exceptions.
|
org.cache2k.CacheManager |
getCacheManager() |
InternalClock |
getClock()
Time reference for the cache.
|
CommonMetrics |
getCommonMetrics() |
org.cache2k.CacheEntry<K,V> |
getEntry(K key) |
String |
getEntryState(K key) |
HeapCache |
getHeapCache()
For testing
|
InternalCacheInfo |
getInfo()
Generate cache statistics.
|
org.cache2k.configuration.CacheType |
getKeyType() |
InternalCacheInfo |
getLatestInfo()
Generate fresh statistics.
|
Log |
getLog()
used from the cache manager
|
String |
getName() |
StorageAdapter |
getStorage() |
int |
getTotalEntryCount()
This method is used for
ConcurrentMapWrapper.size() |
org.cache2k.configuration.CacheType |
getValueType() |
void |
init() |
<R> R |
invoke(K key,
org.cache2k.processor.EntryProcessor<K,V,R> entryProcessor) |
boolean |
isClosed() |
boolean |
isNullValuePermitted() |
Iterator<org.cache2k.CacheEntry<K,V>> |
iterator() |
void |
loadAll(Iterable<? extends K> _keys,
org.cache2k.CacheOperationCompletionListener l) |
void |
lockAndRunForPurge(K key,
PurgeableStorage.PurgeAction _action)
Insert a cache entry for the given key and run action under the entry
lock.
|
void |
logAndCountInternalException(String s,
Throwable t) |
void |
onEvictionFromHeap(Entry<K,V> e)
Nothing done here.
|
V |
peek(K key) |
Map<K,V> |
peekAll(Iterable<? extends K> keys)
We need to deal with possible null values and exceptions.
|
V |
peekAndPut(K key,
V value) |
V |
peekAndRemove(K key) |
V |
peekAndReplace(K key,
V value) |
org.cache2k.CacheEntry<K,V> |
peekEntry(K key) |
void |
prefetch(K key) |
void |
prefetchAll(Iterable<? extends K> _keys,
org.cache2k.CacheOperationCompletionListener l) |
void |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
boolean |
putIfAbsent(K key,
V value) |
void |
reloadAll(Iterable<? extends K> _keys,
org.cache2k.CacheOperationCompletionListener l) |
void |
remove(K key) |
boolean |
removeIfEquals(K key,
V value) |
boolean |
replace(K key,
V _newValue) |
boolean |
replaceIfEquals(K key,
V _oldValue,
V _newValue) |
void |
resetStorage(StorageAdapter _from,
StorageAdapter to)
Change the storage implementation to another one or null for a disconnect
|
org.cache2k.CacheEntry<K,V> |
returnCacheEntry(ExaminationEntry<K,V> e) |
void |
timerEventExpireEntry(Entry<K,V> e) |
void |
timerEventProbationTerminated(Entry<K,V> e) |
void |
timerEventRefresh(Entry<K,V> e) |
asMap, clearAndClose, closeCustomization, createCustomization, entries, execute, execute, execute, invokeAll, keys, nameQualifier, removeAll, removeAll, requestInterface, toStringpublic Log getLog()
InternalCachegetLog in interface InternalCache<K,V>public HeapCache getHeapCache()
public InternalClock getClock()
InternalCachegetClock in interface InternalCache<K,V>public boolean isNullValuePermitted()
isNullValuePermitted in interface InternalCache<K,V>public org.cache2k.configuration.CacheType getKeyType()
getKeyType in interface InternalCache<K,V>public org.cache2k.configuration.CacheType getValueType()
getValueType in interface InternalCache<K,V>public org.cache2k.CacheManager getCacheManager()
public void prefetch(K key)
public void prefetchAll(Iterable<? extends K> _keys, org.cache2k.CacheOperationCompletionListener l)
public boolean containsKey(K key)
public void remove(K key)
public boolean containsAndRemove(K key)
public void loadAll(Iterable<? extends K> _keys, org.cache2k.CacheOperationCompletionListener l)
public void reloadAll(Iterable<? extends K> _keys, org.cache2k.CacheOperationCompletionListener l)
public void expireAt(K key, long _millis)
public Map<K,V> getAll(Iterable<? extends K> keys)
public int getTotalEntryCount()
InternalCacheConcurrentMapWrapper.size()getTotalEntryCount in interface InternalCache<K,V>public Map<K,V> peekAll(Iterable<? extends K> keys)
public InternalCacheInfo getLatestInfo()
InternalCacheInternalCache.getInfo() method for requesting information for monitoring.getLatestInfo in interface InternalCache<K,V>public InternalCacheInfo getInfo()
InternalCachegetInfo in interface InternalCache<K,V>public CommonMetrics getCommonMetrics()
getCommonMetrics in interface InternalCache<K,V>public void logAndCountInternalException(String s, Throwable t)
logAndCountInternalException in interface InternalCache<K,V>public void checkIntegrity()
CanCheckIntegritycheckIntegrity in interface CanCheckIntegritypublic void init()
public void cancelTimerJobs()
InternalCachecancelTimerJobs in interface InternalCache<K,V>public void close()
public org.cache2k.CacheEntry<K,V> returnCacheEntry(ExaminationEntry<K,V> e)
returnCacheEntry in interface InternalCache<K,V>public void resetStorage(StorageAdapter _from, StorageAdapter to)
StorageAdapter.ParentresetStorage in interface StorageAdapter.Parentpublic StorageAdapter getStorage()
getStorage in interface InternalCache<K,V>getStorage in class BaseCache<K,V>public void lockAndRunForPurge(K key, PurgeableStorage.PurgeAction _action)
public void onEvictionFromHeap(Entry<K,V> e)
onEvictionFromHeap in interface HeapCacheListener<K,V>protected <R> EntryAction<K,V,R> createEntryAction(K key, Entry<K,V> e, Semantic<K,V,R> op)
createEntryAction in class BaseCache<K,V>public String getEntryState(K key)
getEntryState in interface InternalCache<K,V>public void timerEventExpireEntry(Entry<K,V> e)
timerEventExpireEntry in interface InternalCache<K,V>public void expireOrScheduleFinalExpireEvent(Entry<K,V> e)
expireOrScheduleFinalExpireEvent in interface InternalCache<K,V>HeapCache.expireOrScheduleFinalExpireEvent(Entry)public void timerEventRefresh(Entry<K,V> e)
timerEventRefresh in interface InternalCache<K,V>public void timerEventProbationTerminated(Entry<K,V> e)
timerEventProbationTerminated in interface InternalCache<K,V>cache2k API documentation. Copyright © 2000–2019 headissue GmbH, Munich.