K - the type of keys maintained by this mapV - the type of mapped valuespublic class WriteLockedOffHeapClockCache<K,V> extends AbstractOffHeapClockCache<K,V>
This cache uses one of the unused bits in the off-heap entry's status value to store the clock data. This clock data is safe to update during read operations since the cache provides exclusive-read/write characteristics. Since clock eviction data resides in the hash-map's table, it is correctly copied across during table resize operations.
The cache uses a regular ReentrantLock to provide exclusive read and
write operations.
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 |
|---|
WriteLockedOffHeapClockCache(PageSource source,
boolean tableAllocationsSteal,
StorageEngine<? super K,? super V> storageEngine) |
WriteLockedOffHeapClockCache(PageSource source,
boolean tableAllocationsSteal,
StorageEngine<? super K,? super V> storageEngine,
int tableSize) |
WriteLockedOffHeapClockCache(PageSource source,
StorageEngine<? super K,? super V> storageEngine) |
WriteLockedOffHeapClockCache(PageSource source,
StorageEngine<? super K,? super V> storageEngine,
int tableSize) |
| Modifier and Type | Method and Description |
|---|---|
ReentrantReadWriteLock |
getLock()
Return the
ReentrantReadWriteLock used by this segment. |
Lock |
readLock() |
Lock |
writeLock() |
evict, evictable, getAndPin, getEvictionIndex, hit, isPinned, putPinned, setPinning, storageEngineFailure, tableExpansionFailureclear, computeIfAbsentWithMetadata, computeIfPresentWithMetadata, computeWithMetadata, containsKey, createEntrySet, createKeySet, destroy, fill, fill, get, getAndSetMetadata, getEncodingForHashAndBinary, getMetadata, getValueAndSetMetadata, installMappingForHashAndEncoding, put, put, putIfAbsent, remove, remove, removeAllWithHash, removeMapping, removeNoReturn, replace, replace, shrink, sizeadded, 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, getMetadata, getValueAndSetMetadata, put, removeNoReturn, shrinkgetAllocatedMemory, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSize, getTableCapacity, getUsedSlotCount, getVitalMemoryremoveAllWithHashcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic WriteLockedOffHeapClockCache(PageSource source, StorageEngine<? super K,? super V> storageEngine)
public WriteLockedOffHeapClockCache(PageSource source, boolean tableAllocationsSteal, StorageEngine<? super K,? super V> storageEngine)
public WriteLockedOffHeapClockCache(PageSource source, StorageEngine<? super K,? super V> storageEngine, int tableSize)
public WriteLockedOffHeapClockCache(PageSource source, boolean tableAllocationsSteal, StorageEngine<? super K,? super V> storageEngine, int tableSize)
public Lock readLock()
readLock in interface ReadWriteLockreadLock in class AbstractLockedOffHeapHashMap<K,V>public Lock writeLock()
writeLock in interface ReadWriteLockwriteLock in class AbstractLockedOffHeapHashMap<K,V>public ReentrantReadWriteLock getLock()
SegmentReentrantReadWriteLock used by this segment.Copyright © 2015–2024. All rights reserved.