public class ArcCache<K,T> extends BaseCache<ArcCache.Entry,K,T>
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ArcCache.Entry<K,T>
An entry in the hash table
|
BaseCache.Info, BaseCache.MyTimerTask, BaseCache.TunablebulkCacheSource, bulkGetCnt, clearedTime, entryExpiryCalculator, evictedButInHashCnt, evictedCnt, evictionNeeded, exceptionExpiryCalculator, exceptionMaxLinger, experimentalBulkCacheSource, expiredKeptCnt, expiredRemoveCnt, fetchButHitCnt, fetchCnt, fetchExceptionCnt, fetchMillis, hashSeed, info, internalExceptionCnt, keyMutationCount, keyType, loadHitCnt, loadMissCnt, loadNonFreshAndFetchedCnt, loadNonFreshCnt, lock, mainHash, mainHashCtrl, manager, maximumBulkFetchSize, maxLinger, maxSize, name, newEntryCnt, peekHitNotFreshCnt, peekMissCnt, putCnt, putNewEntryCnt, refreshCnt, refreshHash, refreshHashCtrl, refreshHitCnt, refreshPool, refreshSubmitFailedCnt, removedCnt, shutdownInitiated, shutdownWaitFuture, source, startedTime, storage, suppressedExceptionCnt, timer, timerCancelCount, timerService, touchedTime, TUNABLE, valueType, virginEvictCnt, waitForClear| Constructor and Description |
|---|
ArcCache() |
| Modifier and Type | Method and Description |
|---|---|
protected ArcCache.Entry |
checkForGhost(K key,
int hc)
Check whether we have an entry in the ghost table
remove it from ghost and insert it into the replacement list.
|
protected ArcCache.Entry |
findEvictionCandidate()
Find an entry that should be evicted.
|
protected String |
getExtraStatistics() |
long |
getHitCnt() |
protected IntegrityState |
getIntegrityState() |
protected void |
initializeHeapCache() |
protected void |
insertIntoReplacementList(ArcCache.Entry e)
New cache entry, put it in the replacement algorithm structure
|
protected ArcCache.Entry<K,T> |
newEntry()
Emtpy, done by replace / checkForGhost.
|
protected void |
recordHit(ArcCache.Entry e)
Record an entry hit.
|
protected void |
removeEntryFromReplacementList(ArcCache.Entry e) |
calcNextRefreshTime, calculateHashEntryCount, checkClosed, checkCyclicListIntegrity, checkIntegrity, clear, clearLocalCache, clearTimingStatistics, close, conditionallyStartProcess, contains, destroy, evictEventually, expireEntry, fetch, fetchFromSource, fetchWithStorage, flush, get, getAll, getAll, getBulk, getCompleteName, getCyclicListEntryCount, getEntry, getEntryInternal, getExpiredCnt, getFetchesBecauseOfNewEntries, getFetchesInFlight, getInfo, getLatestInfo, getListEntryCount, getLocalSize, getLog, getName, getStorage, getTotalEntryCount, hasBackgroundRefreshAndServesExpiredValues, hasKeepAfterExpired, hasSharpTimeout, hasSuppressExceptions, init, insert, insert, insertAfterHeadCyclicList, insertEntryFromStorage, insertEntryFromStorage, insertFetched, insertInList, insertIntoHeadCyclicList, insertIntoTailCyclicList, insertOnPut, isClosed, iterateAllHeapEntries, iterateLocalAndStorage, iterator, lockAndRunForPurge, lookupEntry, lookupEntrySynchronized, lookupEntryUnsynchronized, lookupOrNewEntrySynchronized, modifiedHash, moveToFront, newEntry, peek, peekEntry, peekEntryInternal, prefetch, prefetch, prefetch, purge, put, putIfAbsent, remove, removeAllAtOnce, removeEntry, removeFromCyclicList, removeFromCyclicList, removeFromList, removeWithFlag, resetStorage, returnEntry, returnValue, setBulkCacheSource, setCacheConfig, setCacheManager, setEntryExpiryCalculator, setExceptionExpiryCalculator, setExperimentalBulkCacheSource, setExpirySeconds, setFeatureBit, setName, setRefreshController, setSource, setSource, stopStartTimer, timerEvent, toString, updateShutdownWaitFuturepublic ArcCache()
protected void recordHit(ArcCache.Entry e)
BaseCacherecordHit in class BaseCache<ArcCache.Entry,K,T>protected void insertIntoReplacementList(ArcCache.Entry e)
BaseCacheinsertIntoReplacementList in class BaseCache<ArcCache.Entry,K,T>protected ArcCache.Entry<K,T> newEntry()
newEntry in class BaseCache<ArcCache.Entry,K,T>protected ArcCache.Entry checkForGhost(K key, int hc)
BaseCachecheckForGhost in class BaseCache<ArcCache.Entry,K,T>protected void removeEntryFromReplacementList(ArcCache.Entry e)
removeEntryFromReplacementList in class BaseCache<ArcCache.Entry,K,T>protected ArcCache.Entry findEvictionCandidate()
BaseCacheBaseCache.removeEntryFromReplacementList(Entry)
if this entry will be really evicted. Pinned entries may be skipped. A
good eviction algorithm returns another candidate on sequential calls, even
if the candidate was not removed.
Rationale: Within the structure lock we can check for an eviction candidate
and may remove it from the list. However, we cannot process additional operations or
events which affect the entry. For this, we need to acquire the lock on the entry
first.findEvictionCandidate in class BaseCache<ArcCache.Entry,K,T>protected void initializeHeapCache()
initializeHeapCache in class BaseCache<ArcCache.Entry,K,T>protected String getExtraStatistics()
getExtraStatistics in class BaseCache<ArcCache.Entry,K,T>protected IntegrityState getIntegrityState()
getIntegrityState in class BaseCache<ArcCache.Entry,K,T>cache2k API documentation. Copyright © 2000–2015 headissue GmbH, Munich.