K - the type of keys maintained by this mapV - the type of mapped valuespublic abstract class AbstractOffHeapClockCache<K,V> extends AbstractLockedOffHeapHashMap<K,V> implements PinnableCache<K,V>, PinnableSegment<K,V>
Subclasses must implement the two getEvictionIndex(...) methods to
instruct the cache regarding which mappings to remove.
AbstractLockedOffHeapHashMap.LockedEntryIterator, AbstractLockedOffHeapHashMap.LockedEntrySet, AbstractLockedOffHeapHashMap.LockedKeyIterator, AbstractLockedOffHeapHashMap.LockedKeySetOffHeapHashMap.EncodingIterator, OffHeapHashMap.EncodingSet, OffHeapHashMap.EntryIterator, OffHeapHashMap.EntrySet, OffHeapHashMap.HashIterator<T>, OffHeapHashMap.KeyIterator, OffHeapHashMap.KeySetAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>ENCODING, ENTRY_BIT_SHIFT, ENTRY_SIZE, hashtable, hashTablePage, KEY_HASHCODE, modCount, removedSlots, reprobeLimit, RESERVED_STATUS_BITS, size, STATUS, STATUS_REMOVED, STATUS_USED, storageEngine, tableSource| Constructor and Description |
|---|
AbstractOffHeapClockCache(PageSource source,
boolean tableAllocationsSteal,
StorageEngine<? super K,? super V> storageEngine) |
AbstractOffHeapClockCache(PageSource source,
boolean tableAllocationsSteal,
StorageEngine<? super K,? super V> storageEngine,
int tableSize) |
AbstractOffHeapClockCache(PageSource source,
StorageEngine<? super K,? super V> storageEngine) |
AbstractOffHeapClockCache(PageSource source,
StorageEngine<? super K,? super V> storageEngine,
boolean bootstrap) |
AbstractOffHeapClockCache(PageSource source,
StorageEngine<? super K,? super V> storageEngine,
int tableSize) |
AbstractOffHeapClockCache(PageSource source,
StorageEngine<? super K,? super V> storageEngine,
int tableSize,
boolean bootstrap) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
evict(int index,
boolean shrink) |
protected boolean |
evictable(int status) |
V |
getAndPin(K key) |
int |
getEvictionIndex()
Return the table offset of the to be evicted mapping.
|
protected void |
hit(int position,
IntBuffer entry) |
boolean |
isPinned(Object key) |
V |
putPinned(K key,
V value) |
void |
setPinning(K key,
boolean pinned) |
protected void |
storageEngineFailure(Object failure) |
protected void |
tableExpansionFailure(int start,
int length) |
clear, computeIfAbsentWithMetadata, computeIfPresentWithMetadata, computeWithMetadata, containsKey, createEntrySet, createKeySet, destroy, fill, fill, get, getAndSetMetadata, getEncodingForHashAndBinary, getMetadata, getValueAndSetMetadata, installMappingForHashAndEncoding, put, put, putIfAbsent, readLock, remove, remove, removeAllWithHash, removeMapping, removeNoReturn, replace, replace, shrink, size, writeLockadded, createEncodingSet, encodingSet, entrySet, fill, freePendingTables, getAllocatedMemory, getAtTableOffset, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getEntryAtTableOffset, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSize, getSlotForHashAndEncoding, getStorageEngine, getTableCapacity, getUsedSlotCount, getVitalMemory, indexFor, indexFor, isAvailable, isPresent, isRemoved, isRemoved, isTerminating, isTerminating, isThiefForTableAllocations, keySet, readLong, readLong, removeAtTableOffset, removed, shrinkTable, spread, tryIncreaseReprobe, updated, updateEncodingclone, containsValue, equals, hashCode, isEmpty, putAll, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcomputeIfAbsentWithMetadata, computeIfPresentWithMetadata, computeWithMetadata, destroy, fill, fill, getAndSetMetadata, getLock, getMetadata, getValueAndSetMetadata, put, removeNoReturn, shrinkgetAllocatedMemory, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSize, getTableCapacity, getUsedSlotCount, getVitalMemoryreadLock, writeLockremoveAllWithHashcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic AbstractOffHeapClockCache(PageSource source, StorageEngine<? super K,? super V> storageEngine)
public AbstractOffHeapClockCache(PageSource source, boolean tableAllocationsSteal, StorageEngine<? super K,? super V> storageEngine)
public AbstractOffHeapClockCache(PageSource source, StorageEngine<? super K,? super V> storageEngine, boolean bootstrap)
public AbstractOffHeapClockCache(PageSource source, StorageEngine<? super K,? super V> storageEngine, int tableSize)
public AbstractOffHeapClockCache(PageSource source, boolean tableAllocationsSteal, StorageEngine<? super K,? super V> storageEngine, int tableSize)
public AbstractOffHeapClockCache(PageSource source, StorageEngine<? super K,? super V> storageEngine, int tableSize, boolean bootstrap)
protected void storageEngineFailure(Object failure)
storageEngineFailure in class OffHeapHashMap<K,V>protected void tableExpansionFailure(int start,
int length)
tableExpansionFailure in class OffHeapHashMap<K,V>protected void hit(int position,
IntBuffer entry)
hit in class OffHeapHashMap<K,V>public int getEvictionIndex()
The mapping to be evicted can occur anywhere in this cache's table.
protected boolean evictable(int status)
public boolean evict(int index,
boolean shrink)
evict in interface StorageEngine.Ownerevict in class AbstractLockedOffHeapHashMap<K,V>public boolean isPinned(Object key)
isPinned in interface PinnableCache<K,V>public void setPinning(K key, boolean pinned)
setPinning in interface PinnableCache<K,V>public V putPinned(K key, V value)
putPinned in interface PinnableCache<K,V>Copyright © 2015–2024. All rights reserved.