Package org.cache2k.core.api
Interface InternalCache<K,V>
-
- All Superinterfaces:
AutoCloseable,org.cache2k.Cache<K,V>,org.cache2k.DataAware<K,V>,InternalCacheCloseContext,org.cache2k.KeyValueSource<K,V>,TimerEventListener<K,V>
- All Known Implementing Classes:
BaseCache,HeapCache,IntHeapCache,WiredCache
public interface InternalCache<K,V> extends org.cache2k.Cache<K,V>, TimerEventListener<K,V>, InternalCacheCloseContext
Interface to extended cache functions for the internal components.- Author:
- Jens Wilke
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidcancelTimerJobs()used from the cache manager for shutdownvoidcheckIntegrity()Cache checks its internal integrity.org.cache2k.operation.TimeReferencegetClock()Time reference for the cache.CommonMetricsgetCommonMetrics()InternalCacheInfogetConsistentInfo()Generate fresh statistics within a global cache lock.StringgetEntryState(K key)EvictiongetEviction()InternalCacheInfogetInfo()Return cache statistic counters.org.cache2k.config.CacheTypegetKeyType()LoggetLog()used from the cache managerStringgetQualifiedName()org.cache2k.operation.TimeReferencegetTimeReference()TiminggetTiming()longgetTotalEntryCount()This method is used forConcurrentMapWrapper.size()default org.cache2k.Cache<K,V>getUserCache()Cache used by user, eventually wrapped.org.cache2k.config.CacheTypegetValueType()booleanisDisabled()booleanisLoaderPresent()booleanisNullValuePermitted()booleanisWeigherPresent()voidlogAndCountInternalException(String s, Throwable t)org.cache2k.CacheEntry<K,V>returnCacheEntry(ExaminationEntry<K,V> e)voidsetDisabled(boolean f)-
Methods inherited from interface org.cache2k.Cache
asMap, clear, close, computeIfAbsent, containsAndRemove, containsKey, entries, expireAt, get, getAll, getCacheManager, getEntry, getName, invoke, invokeAll, isClosed, keys, loadAll, mutate, mutateAll, peek, peekAll, peekAndPut, peekAndRemove, peekAndReplace, peekEntry, put, putAll, putIfAbsent, reloadAll, remove, removeAll, removeAll, removeIfEquals, replace, replaceIfEquals, requestInterface, toString
-
Methods inherited from interface org.cache2k.core.api.InternalCacheCloseContext
closeCustomization, getCacheManager, getName
-
Methods inherited from interface org.cache2k.core.timing.TimerEventListener
getName, timerEventExpireEntry, timerEventProbationTerminated, timerEventRefresh
-
-
-
-
Method Detail
-
getCommonMetrics
CommonMetrics getCommonMetrics()
-
getLog
Log getLog()
used from the cache manager
-
getKeyType
org.cache2k.config.CacheType getKeyType()
-
getValueType
org.cache2k.config.CacheType getValueType()
-
cancelTimerJobs
void cancelTimerJobs()
used from the cache manager for shutdown
-
getInfo
InternalCacheInfo getInfo()
Return cache statistic counters. This method is intended for regular statistics polling. No extensive locking is performed to extract a consistent set of counters.
-
getConsistentInfo
InternalCacheInfo getConsistentInfo()
Generate fresh statistics within a global cache lock. This version is used by internal consistency tests. This method is not intended to be called at high frequencies or for attaching monitoring or logging. Use thegetInfo()method for requesting information for monitoring.
-
getTotalEntryCount
long getTotalEntryCount()
This method is used forConcurrentMapWrapper.size()
-
isNullValuePermitted
boolean isNullValuePermitted()
-
getClock
org.cache2k.operation.TimeReference getClock()
Time reference for the cache.
-
returnCacheEntry
org.cache2k.CacheEntry<K,V> returnCacheEntry(ExaminationEntry<K,V> e)
-
isWeigherPresent
boolean isWeigherPresent()
-
isLoaderPresent
boolean isLoaderPresent()
-
isDisabled
boolean isDisabled()
-
setDisabled
void setDisabled(boolean f)
-
getEviction
Eviction getEviction()
-
getTiming
Timing getTiming()
-
getTimeReference
org.cache2k.operation.TimeReference getTimeReference()
-
getUserCache
default org.cache2k.Cache<K,V> getUserCache()
Cache used by user, eventually wrapped. Only available in WiredCache for event processing.
-
checkIntegrity
void checkIntegrity()
Cache checks its internal integrity. This is a expansive operation because it may traverse all cache entries. Used for testing.- Throws:
IllegalStateException- if integrity problem is found
-
getQualifiedName
String getQualifiedName()
-
-