Package org.cache2k.core
Class IntHeapCache<V>
- java.lang.Object
-
- org.cache2k.core.BaseCache<K,V>
-
- org.cache2k.core.HeapCache<Integer,V>
-
- org.cache2k.core.IntHeapCache<V>
-
- All Implemented Interfaces:
AutoCloseable
,org.cache2k.Cache<Integer,V>
,InternalCache<Integer,V>
,InternalCacheCloseContext
,HeapCacheForEviction<Integer,V>
,TimerEventListener<Integer,V>
,org.cache2k.DataAware<Integer,V>
,org.cache2k.KeyValueSource<Integer,V>
public class IntHeapCache<V> extends HeapCache<Integer,V>
Overwrite methods so the integer value gets stored directly in theEntry.hashCode
field andEntry.value
is set to null.- Author:
- Jens Wilke
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.cache2k.core.HeapCache
HeapCache.Tunable
-
-
Field Summary
-
Fields inherited from class org.cache2k.core.HeapCache
clearCnt, clearedTime, clearRemovedCnt, clock, DEFAULT_EXCEPTION_PROPAGATOR, exceptionPropagator, hash, internalExceptionCnt, keyMutationCnt, keyType, loader, lock, manager, name, startedTime, timing, TUNABLE, valueType
-
-
Constructor Summary
Constructors Constructor Description IntHeapCache(InternalCacheBuildContext<Integer,V> ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Hash2<Integer,V>
createHashTable()
Modified hash table implementation.Integer
extractIntKeyObj(Integer key)
The key object or null, for integer keyed cachesint
extractIntKeyValue(Integer key, int hc)
Modified hash code or integer value for integer keyed cachesInteger
extractKeyObj(Entry<Integer,V> e)
int
extractModifiedHash(Entry e)
-
Methods inherited from class org.cache2k.core.HeapCache
cancelTimerJobs, checkAllPresent, checkClosed, checkIntegrity, clear, clearLocalCache, close, closePart1, closePart2, computeIfAbsent, containsAndRemove, containsKey, convertCacheEntry2ValueMap, convertValueMap, createEntryAction, createFireAndForgetAction, executeLoader, executeWithGlobalLock, expireEntry, finishLoadOrEviction, generateKeySet, get, getAll, getCacheManager, getClock, getCommonMetrics, getConsistentInfo, getConsistentInfo, getEntry, getEntryInternal, getEntryInternal, getEntryState, getEviction, getExecutor, getHashEntries, getInfo, getInfo, getIntegrityState, getKeyType, getLoaderExecutor, getLog, getName, getRefreshExecutor, getTiming, getTotalEntryCount, getValueType, init, initWithoutTimerHandler, insert, insertNewEntry, insertOrUpdateAndCalculateExpiry, invoke, isClosed, isKeepAfterExpired, isLoaderPresent, isNullValuePermitted, isRecordRefreshTime, isRefreshAhead, isRejectNullValues, isUpdateTimeNeeded, isWeigherPresent, iterateAllHeapEntries, iterator, load, loadAll, loadAndReplace, logAndCountInternalException, lookupEntry, lookupEntry, lookupEntryNoHitRecord, lookupEntryNoHitRecord, lookupOrNewEntry, lookupOrNewEntry, lookupOrNewEntryNoHitRecord, modifiedHash, peek, peekAll, peekAndPut, peekAndRemove, peekAndReplace, peekEntry, peekEntryInternal, peekEntryInternal, put, putAll, putIfAbsent, putValue, recordHit, reloadAll, remove, removeEntry, removeEntryForEviction, removeIfEquals, replace, replace, replaceIfEquals, returnCacheEntry, returnCacheEntry, returnEntry, returnNullValueDetectedException, returnValue, returnValue, setTiming, startRefreshProbationTimer, timerEventExpireEntry, timerEventProbationTerminated, timerEventRefresh
-
Methods inherited from class org.cache2k.core.BaseCache
asMap, closeCustomization, entries, execute, execute, expireAt, getQualifiedName, invokeAll, keys, removeAll, removeAll, requestInterface, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.cache2k.core.api.InternalCache
getUserCache
-
-
-
-
Constructor Detail
-
IntHeapCache
public IntHeapCache(InternalCacheBuildContext<Integer,V> ctx)
-
-
Method Detail
-
extractIntKeyObj
public Integer extractIntKeyObj(Integer key)
Description copied from class:HeapCache
The key object or null, for integer keyed caches- Overrides:
extractIntKeyObj
in classHeapCache<Integer,V>
-
extractIntKeyValue
public int extractIntKeyValue(Integer key, int hc)
Description copied from class:HeapCache
Modified hash code or integer value for integer keyed caches- Overrides:
extractIntKeyValue
in classHeapCache<Integer,V>
-
extractModifiedHash
public int extractModifiedHash(Entry e)
- Overrides:
extractModifiedHash
in classHeapCache<Integer,V>
-
extractKeyObj
public Integer extractKeyObj(Entry<Integer,V> e)
- Overrides:
extractKeyObj
in classHeapCache<Integer,V>
-
-