| Package | Description |
|---|---|
| org.cache2k.impl |
| Modifier and Type | Class and Description |
|---|---|
class |
BaseCache<E extends Entry,K,T>
Foundation for all cache variants.
|
class |
ClosableConcurrentHashEntryIterator<E extends Entry>
Iterator over all hash table entries of two hashes.
|
class |
Entry<E extends Entry,K,T>
The cache entry.
|
class |
Hash<E extends Entry>
Fast hash table implementation.
|
class |
LockFreeCache<E extends Entry,K,T> |
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ArcCache.Entry<K,T>
An entry in the hash table
|
protected static class |
LruCache.Entry<K,T> |
| Modifier and Type | Field and Description |
|---|---|
Entry<E,K,T> |
Entry.another
Hash implementation: Link to another entry in the same hash table slot when the hash code collides.
|
protected E[] |
BaseCache.mainHash |
E |
Entry.next
Lru list: pointer to next element or list head
|
E |
Entry.prev
Lru list: pointer to previous element or list head
|
protected E[] |
BaseCache.refreshHash |
| Modifier and Type | Method and Description |
|---|---|
protected static <E extends Entry> |
BaseCache.insertAfterHeadCyclicList(E _head,
E e)
Insert X into A B C, yields: A X B C.
|
protected static <E extends Entry> |
BaseCache.insertIntoHeadCyclicList(E _head,
E e)
Insert element at the head of the list
|
protected static <E extends Entry> |
BaseCache.insertIntoTailCyclicList(E _head,
E e) |
static <E extends Entry> |
Hash.lookup(E[] _hashTable,
Object key,
int _hashCode) |
protected static <E extends Entry> |
BaseCache.moveToFront(E _head,
E e) |
protected static <E extends Entry> |
BaseCache.removeFromCyclicList(E _head,
E e) |
| Modifier and Type | Method and Description |
|---|---|
protected Entry |
RandomCache.findEvictionCandidate()
Start at arbitrary hash slot and evict the next best entry.
|
E[] |
Hash.init(Class<E> _entryType) |
E[] |
Hash.insert(E[] _hashTable,
Entry _entry) |
protected Entry |
BaseCache.insertEntryFromStorage(StorageEntry se,
boolean _needsFetch)
Insert the storage entry in the heap cache and return it.
|
protected Entry |
RandomCache.newEntry() |
protected static Entry |
BaseCache.removeFromCyclicList(Entry e) |
| Modifier and Type | Method and Description |
|---|---|
ClosableIterator<Entry> |
NoopStorageAdapter.iterateAll() |
ClosableIterator<Entry> |
PassingStorageAdapter.iterateAll() |
ClosableIterator<Entry> |
FailureStorageAdapter.iterateAll() |
abstract ClosableIterator<Entry> |
StorageAdapter.iterateAll() |
ClosableIterator<Entry> |
AggregationStorageAdapter.iterateAll()
Use the last storage, which should be the biggest and contain
all entries.
|
protected ClosableConcurrentHashEntryIterator<Entry> |
BaseCache.iterateAllHeapEntries()
Returns all cache entries within the heap cache.
|
protected ClosableIterator<Entry> |
BaseCache.iterateLocalAndStorage()
Complete iteration of all entries in the cache, including
storage / persisted entries.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
Hash.calcEntryCount(Entry[] _hashTable)
Count the entries in the hash table, by scanning through the hash table.
|
static void |
Hash.calcHashCollisionInfo(org.cache2k.impl.BaseCache.CollisionInfo inf,
Entry[] _hashTable) |
protected long |
BaseCache.calcNextRefreshTime(K _key,
T _newObject,
long now,
Entry _entry) |
protected static boolean |
BaseCache.checkCyclicListIntegrity(Entry e) |
static boolean |
Hash.contains(Entry[] _hashTable,
Object key,
int _hashCode) |
void |
NoopStorageAdapter.evict(Entry e) |
void |
PassingStorageAdapter.evict(Entry e)
If passivation is not enabled, then we need to do nothing here since, the
entry was transferred to the storage on the
StorageAdapter.put(Entry, long)
operation. |
void |
FailureStorageAdapter.evict(Entry e) |
abstract void |
StorageAdapter.evict(Entry e) |
void |
AggregationStorageAdapter.evict(Entry e) |
void |
NoopStorageAdapter.expire(Entry e) |
void |
PassingStorageAdapter.expire(Entry e)
An expired entry was removed from the memory cache and
can also be removed from the storage.
|
void |
FailureStorageAdapter.expire(Entry e) |
abstract void |
StorageAdapter.expire(Entry e)
TODO: Relly needed?
|
void |
AggregationStorageAdapter.expire(Entry e) |
protected static int |
BaseCache.getCyclicListEntryCount(Entry e) |
protected static int |
BaseCache.getListEntryCount(Entry _head) |
static int |
Hash.index(Entry[] _hashTable,
int _hashCode) |
E[] |
Hash.insert(E[] _hashTable,
Entry _entry) |
E[] |
Hash.insert(E[] _hashTable,
Entry _entry) |
protected static void |
BaseCache.insertInList(Entry _head,
Entry e) |
protected static void |
BaseCache.insertInList(Entry _head,
Entry e) |
protected void |
RandomCache.insertIntoReplacementList(Entry e) |
static void |
Hash.insertWoExpand(Entry[] _hashTable,
Entry e) |
static void |
Hash.insertWoExpand(Entry[] _hashTable,
Entry e) |
static <E extends Entry> |
Hash.lookup(E[] _hashTable,
Object key,
int _hashCode) |
void |
NoopStorageAdapter.put(Entry e,
long _nextRefreshTime) |
void |
PassingStorageAdapter.put(Entry e,
long _nextRefreshTime)
Store entry on cache put.
|
void |
FailureStorageAdapter.put(Entry e,
long _nextRefreshTime) |
abstract void |
StorageAdapter.put(Entry e,
long _nextRefreshTime) |
void |
AggregationStorageAdapter.put(Entry e,
long _nextRefreshTime)
Send put to all storage instances.
|
protected void |
RandomCache.recordHit(Entry entry) |
E |
Hash.remove(E[] _hashTable,
Object key,
int hc)
Remove entry from the hash.
|
boolean |
Hash.remove(Entry[] _hashTable,
Entry _entry) |
boolean |
Hash.remove(Entry[] _hashTable,
Entry _entry) |
protected void |
RandomCache.removeEntryFromReplacementList(Entry e) |
protected static Entry |
BaseCache.removeFromCyclicList(Entry e) |
protected static void |
BaseCache.removeFromList(Entry e) |
protected CacheEntry<K,T> |
BaseCache.returnEntry(Entry<E,K,T> e)
Wrap entry in a separate object instance.
|
protected T |
BaseCache.returnValue(Entry<E,K,T> e) |
| Constructor and Description |
|---|
ClosableConcurrentHashEntryIterator(Hash<E> _hashCtl,
E[] _hash,
Hash<E> _hashCtl2,
E[] _hash2) |
ClosableConcurrentHashEntryIterator(Hash<E> _hashCtl,
E[] _hash,
Hash<E> _hashCtl2,
E[] _hash2) |
cache2k API documentation. Copyright © 2000–2015 headissue GmbH, Munich.