Class ReadWriteLockedOffHeapHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
org.terracotta.offheapstore.OffHeapHashMap<K,V>
org.terracotta.offheapstore.AbstractLockedOffHeapHashMap<K,V>
org.terracotta.offheapstore.ReadWriteLockedOffHeapHashMap<K,V>
- Type Parameters:
K- the type of keys maintained by this mapV- the type of mapped values
- All Implemented Interfaces:
ConcurrentMap<K,V>, ReadWriteLock, Map<K, V>, HashingMap<K, V>, MapInternals, Segment<K, V>, StorageEngine.Owner
A concurrent-read, exclusive-write off-heap hash-map.
This map uses a regular ReentrantReadWriteLock to provide read/write
exclusion/sharing properties.
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractLockedOffHeapHashMap
AbstractLockedOffHeapHashMap.LockedEntryIterator, AbstractLockedOffHeapHashMap.LockedEntrySet, AbstractLockedOffHeapHashMap.LockedKeyIterator, AbstractLockedOffHeapHashMap.LockedKeySetNested classes/interfaces inherited from class OffHeapHashMap
OffHeapHashMap.DirectEntry, OffHeapHashMap.EncodingIterator, OffHeapHashMap.EncodingSet, OffHeapHashMap.EntryIterator, OffHeapHashMap.EntrySet, OffHeapHashMap.HashIterator<T>, OffHeapHashMap.KeyIterator, OffHeapHashMap.KeySet, OffHeapHashMap.PendingPageNested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
FieldsFields inherited from class OffHeapHashMap
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 Summary
ConstructorsConstructorDescriptionReadWriteLockedOffHeapHashMap(PageSource tableSource, boolean tableAllocationsSteal, StorageEngine<? super K, ? super V> storageEngine) ReadWriteLockedOffHeapHashMap(PageSource tableSource, boolean tableAllocationsSteal, StorageEngine<? super K, ? super V> storageEngine, int tableSize) ReadWriteLockedOffHeapHashMap(PageSource tableSource, StorageEngine<? super K, ? super V> storageEngine) ReadWriteLockedOffHeapHashMap(PageSource tableSource, StorageEngine<? super K, ? super V> storageEngine, int tableSize) -
Method Summary
Methods inherited from class AbstractLockedOffHeapHashMap
clear, computeIfAbsentWithMetadata, computeIfPresentWithMetadata, computeWithMetadata, containsKey, createEntrySet, createKeySet, destroy, evict, fill, fill, get, getAndSetMetadata, getEncodingForHashAndBinary, getMetadata, getValueAndSetMetadata, installMappingForHashAndEncoding, put, put, putIfAbsent, remove, remove, removeAllWithHash, removeMapping, removeNoReturn, replace, replace, shrink, sizeMethods inherited from class OffHeapHashMap
added, createEncodingSet, encodingSet, entrySet, fill, freePendingTables, getAllocatedMemory, getAtTableOffset, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getEntryAtTableOffset, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSize, getSlotForHashAndEncoding, getStorageEngine, getTableCapacity, getUsedSlotCount, getVitalMemory, hit, indexFor, indexFor, isAvailable, isPresent, isRemoved, isRemoved, isTerminating, isTerminating, isThiefForTableAllocations, keySet, readLong, readLong, removeAtTableOffset, removed, shrinkTable, spread, storageEngineFailure, tableExpansionFailure, tryIncreaseReprobe, updated, updateEncodingMethods inherited from class AbstractMap
clone, containsValue, equals, hashCode, isEmpty, putAll, toString, valuesMethods inherited from interface ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAllMethods inherited from interface Map
containsValue, entrySet, equals, hashCode, isEmpty, keySet, putAll, valuesMethods inherited from interface MapInternals
getAllocatedMemory, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSize, getTableCapacity, getUsedSlotCount, getVitalMemory
-
Field Details
-
lock
-
-
Constructor Details
-
ReadWriteLockedOffHeapHashMap
public ReadWriteLockedOffHeapHashMap(PageSource tableSource, StorageEngine<? super K, ? super V> storageEngine) -
ReadWriteLockedOffHeapHashMap
public ReadWriteLockedOffHeapHashMap(PageSource tableSource, boolean tableAllocationsSteal, StorageEngine<? super K, ? super V> storageEngine) -
ReadWriteLockedOffHeapHashMap
public ReadWriteLockedOffHeapHashMap(PageSource tableSource, StorageEngine<? super K, ? super V> storageEngine, int tableSize) -
ReadWriteLockedOffHeapHashMap
public ReadWriteLockedOffHeapHashMap(PageSource tableSource, boolean tableAllocationsSteal, StorageEngine<? super K, ? super V> storageEngine, int tableSize)
-
-
Method Details
-
readLock
- Specified by:
readLockin interfaceReadWriteLock- Specified by:
readLockin classAbstractLockedOffHeapHashMap<K,V>
-
writeLock
- Specified by:
writeLockin interfaceReadWriteLock- Specified by:
writeLockin classAbstractLockedOffHeapHashMap<K,V>
-
getLock
Description copied from interface:SegmentReturn theReentrantReadWriteLockused by this segment.- Returns:
- RRWL for this segment
-