Package | Description |
---|---|
org.cache2k.core | |
org.cache2k.core.operation | |
org.cache2k.core.storageApi |
Modifier and Type | Field and Description |
---|---|
Entry |
Entry.next
Lru list: pointer to next element or list head
|
Entry |
Entry.prev
Lru list: pointer to previous element or list head
|
Modifier and Type | Method and Description |
---|---|
static <E extends Entry> |
Entry.insertAfterHeadCyclicList(E _head,
E e)
Insert X into A B C, yields: A X B C.
|
static <E extends Entry> |
Entry.insertIntoHeadCyclicList(E _head,
E e)
Insert element at the head of the list
|
static <E extends Entry> |
Entry.insertIntoTailCyclicList(E _head,
E e) |
static <E extends Entry> |
Entry.moveToFront(E _head,
E e) |
static <E extends Entry> |
Entry.removeFromCyclicList(E _head,
E e) |
Modifier and Type | Method and Description |
---|---|
protected Entry |
RandomEviction.findEvictionCandidate(Entry _previous) |
protected Entry |
ClockProPlusEviction.findEvictionCandidate(Entry _previous)
Runs cold hand an in turn hot hand to find eviction candidate.
|
protected Entry |
ClockEviction.findEvictionCandidate(Entry _previous)
Run to evict an entry.
|
protected abstract Entry |
AbstractEviction.findEvictionCandidate(Entry e) |
Entry<K,V>[] |
Hash2.getEntries()
Entry table for used by the iterator.
|
protected Entry |
HeapCache.getEntryInternal(K key) |
protected Entry<K,V> |
HeapCache.insertNewEntry(K key,
int hc)
Insert new entry in all structures (hash and eviction).
|
Entry<K,V> |
Hash2.insertWithinLock(Entry<K,V> e,
int _hash)
Insert an entry.
|
Entry<K,V> |
Hash2.lookup(K key,
int _hash)
Lookup the entry in the hash table and return it.
|
protected Entry<K,V> |
HeapCache.lookupEntry(K key) |
protected Entry<K,V> |
HeapCache.lookupEntry(K key,
int hc) |
protected Entry |
HeapCache.lookupEntryNoHitRecord(K key) |
protected Entry |
HeapCache.lookupEntryNoHitRecord(K key,
int hc) |
protected Entry<K,V> |
HeapCache.lookupOrNewEntry(K key)
Lookup or create a new entry.
|
protected Entry<K,V> |
HeapCache.lookupOrNewEntry(K key,
int hc) |
protected Entry<K,V> |
HeapCache.lookupOrNewEntryNoHitRecord(K key) |
Entry<K,V> |
ConcurrentEntryIterator.next() |
protected Entry<K,V> |
HeapCache.peekEntryInternal(K key)
Return the entry, if it is in the cache, without invoking the
cache source.
|
static Entry |
Entry.removeFromCyclicList(Entry e) |
protected Entry<K,V> |
HeapCache.replace(K key,
boolean _compare,
V _oldValue,
V _newValue)
replace if value matches.
|
Entry |
Entry.shortCircuit() |
Modifier and Type | Method and Description |
---|---|
abstract long |
TimingHandler.cacheExceptionUntil(Entry<K,V> e,
ExceptionInformation inf)
Delegated to the resilience policy
|
abstract long |
TimingHandler.calculateNextRefreshTime(Entry<K,V> e,
V v,
long _loadTime)
Calculates the expiry time for a value that was just loaded or inserted into the cache.
|
void |
TimingHandler.cancelExpiryTimer(Entry<K,V> e)
Cancel the timer on the entry, if a timer was set.
|
static boolean |
Entry.checkCyclicListIntegrity(Entry e) |
protected <R> EntryAction<K,V,R> |
WiredCache.createEntryAction(K key,
Entry<K,V> e,
Semantic<K,V,R> op) |
protected <R> EntryAction<K,V,R> |
HeapCache.createEntryAction(K key,
Entry<K,V> e,
Semantic<K,V,R> op) |
protected abstract <R> EntryAction<K,V,R> |
BaseCache.createEntryAction(K key,
Entry<K,V> e,
Semantic<K,V,R> op) |
protected <R> R |
BaseCache.execute(K key,
Entry<K,V> e,
Semantic<K,V,R> op) |
protected void |
HeapCache.expireEntry(Entry e) |
void |
InternalCache.expireOrScheduleFinalExpireEvent(Entry<K,V> e) |
void |
WiredCache.expireOrScheduleFinalExpireEvent(Entry<K,V> e) |
void |
HeapCache.expireOrScheduleFinalExpireEvent(Entry<K,V> e) |
protected Entry |
RandomEviction.findEvictionCandidate(Entry _previous) |
protected Entry |
ClockProPlusEviction.findEvictionCandidate(Entry _previous)
Runs cold hand an in turn hot hand to find eviction candidate.
|
protected Entry |
ClockEviction.findEvictionCandidate(Entry _previous)
Run to evict an entry.
|
protected abstract Entry |
AbstractEviction.findEvictionCandidate(Entry e) |
protected void |
HeapCache.finishLoadOrEviction(Entry e,
long _nextRefreshTime) |
static int |
Entry.getCyclicListEntryCount(Entry e) |
static int |
Entry.getListEntryCount(Entry _head) |
void |
EntryAction.heapHit(Entry<K,V> e) |
protected void |
HeapCache.insert(Entry<K,V> e,
V _value,
long t0,
long t,
byte _updateStatistics,
long _nextRefreshTime) |
static void |
Entry.insertInList(Entry _head,
Entry e) |
static void |
Entry.insertInList(Entry _head,
Entry e) |
protected void |
RandomEviction.insertIntoReplacementList(Entry e) |
protected void |
ClockProPlusEviction.insertIntoReplacementList(Entry e) |
protected void |
ClockEviction.insertIntoReplacementList(Entry e) |
protected abstract void |
AbstractEviction.insertIntoReplacementList(Entry e) |
protected void |
HeapCache.insertOrUpdateAndCalculateExpiry(Entry<K,V> e,
V v,
long t0,
long t,
byte _updateStatistics)
Calculate the next refresh time if a timer / expiry is needed and call insert.
|
Entry<K,V> |
Hash2.insertWithinLock(Entry<K,V> e,
int _hash)
Insert an entry.
|
protected void |
HeapCache.load(Entry<K,V> e) |
void |
WiredCache.onEvictionFromHeap(Entry<K,V> e) |
void |
HeapCacheListener.onEvictionFromHeap(Entry<K,V> e) |
void |
HeapCacheListener.NoOperation.onEvictionFromHeap(Entry<K,V> e) |
protected void |
HeapCache.recordHit(Entry e)
Increment the hit counter, because entry was accessed.
|
boolean |
Hash2.remove(Entry<K,V> e)
Remove existing entry from the hash.
|
protected boolean |
HeapCache.removeEntry(Entry e)
Remove the entry from the hash and the replacement list.
|
boolean |
HeapCache.removeEntryForEviction(Entry<K,V> e)
Remove the entry from the hash table.
|
static Entry |
Entry.removeFromCyclicList(Entry e) |
static void |
Entry.removeFromList(Entry e) |
protected void |
RandomEviction.removeFromReplacementList(Entry e) |
protected void |
ClockProPlusEviction.removeFromReplacementList(Entry e)
Remove, expire or eviction of an entry happens.
|
protected void |
ClockEviction.removeFromReplacementList(Entry e) |
protected abstract void |
AbstractEviction.removeFromReplacementList(Entry e) |
void |
ClockProPlusEviction.removeFromReplacementListOnEvict(Entry e)
Track the entry on the ghost list and call the usual remove procedure.
|
protected void |
AbstractEviction.removeFromReplacementListOnEvict(Entry e) |
boolean |
Hash2.removeWithinLock(Entry<K,V> e,
int _hash) |
static <K,V> SimpleCacheEntry<K,V> |
HeapCache.returnSimpleEntry(Entry<K,V> _entry)
Wrap the cache entry into a new entry object and return it.
|
protected V |
HeapCache.returnValue(Entry<K,V> e) |
void |
TimingHandler.scheduleFinalTimerForSharpExpiry(Entry<K,V> e)
Schedule second timer event for the expiry tie if sharp expiry is switched on.
|
void |
HeapCache.startRefreshProbationTimer(Entry<K,V> e,
long _nextRefreshTime) |
boolean |
TimingHandler.startRefreshProbationTimer(Entry<K,V> e,
long _nextRefreshTime)
Start timer for expiring an entry on the separate refresh hash.
|
long |
TimingHandler.stopStartTimer(long _expiryTime,
Entry<K,V> e)
Convert expiry value to the entry field value, essentially maps 0 to
EXPIRED
since 0 is a virgin entry. |
void |
SegmentedEviction.submit(Entry e) |
void |
Eviction.submit(Entry e)
Submit to eviction for inserting or removing from the replacement list.
|
void |
AbstractEviction.submit(Entry e) |
boolean |
SegmentedEviction.submitWithoutEviction(Entry e) |
boolean |
Eviction.submitWithoutEviction(Entry e)
Submit to eviction for inserting or removing from the replacement list.
|
boolean |
AbstractEviction.submitWithoutEviction(Entry e) |
abstract long |
TimingHandler.suppressExceptionUntil(Entry<K,V> e,
ExceptionInformation inf)
Delegated to the resilience policy
|
void |
InternalCache.timerEventExpireEntry(Entry<K,V> e) |
void |
WiredCache.timerEventExpireEntry(Entry<K,V> e) |
void |
HeapCache.timerEventExpireEntry(Entry<K,V> e) |
void |
InternalCache.timerEventProbationTerminated(Entry<K,V> e) |
void |
WiredCache.timerEventProbationTerminated(Entry<K,V> e) |
void |
HeapCache.timerEventProbationTerminated(Entry<K,V> e) |
void |
InternalCache.timerEventRefresh(Entry<K,V> e) |
void |
WiredCache.timerEventRefresh(Entry<K,V> e) |
void |
HeapCache.timerEventRefresh(Entry<K,V> e) |
Constructor and Description |
---|
EntryAction(HeapCache<K,V> _heapCache,
InternalCache<K,V> _userCache,
Semantic<K,V,R> op,
K k,
Entry<K,V> e) |
ExceptionWrapper(K _key,
Throwable _exception,
long _loadTime,
Entry e)
Take over exception information from the entry, which either has
no exception, an existing cached exception or a suppressed exception.
|
Constructor and Description |
---|
ReadOnlyCacheEntry(Entry<K,V> entry) |
Modifier and Type | Method and Description |
---|---|
abstract Iterator<Entry> |
StorageAdapter.iterateAll() |
Modifier and Type | Method and Description |
---|---|
abstract void |
StorageAdapter.evict(Entry e) |
abstract void |
StorageAdapter.expire(Entry e) |
abstract void |
StorageAdapter.put(Entry e,
long _nextRefreshTime) |
cache2k API documentation. Copyright © 2000–2018 headissue GmbH, Munich.