org.terracotta.offheapstore
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
public class ReadWriteLockedOffHeapHashMap<K,V>
- extends AbstractLockedOffHeapHashMap<K,V>
A concurrent-read, exclusive-write off-heap hash-map.
This map uses a regular ReentrantReadWriteLock to provide read/write
exclusion/sharing properties.
- Author:
- Chris Dennis
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
| Fields inherited from class org.terracotta.offheapstore.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 |
ReadWriteLockedOffHeapHashMap(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)
|
| Methods inherited from class org.terracotta.offheapstore.AbstractLockedOffHeapHashMap |
clear, computeIfAbsentWithMetadata, computeIfPresentWithMetadata, computeWithMetadata, containsKey, destroy, entrySet, evict, fill, fill, get, getAndSetMetadata, getEncodingForHashAndBinary, getMetadata, getValueAndSetMetadata, installMappingForHashAndEncoding, keySet, put, put, putIfAbsent, remove, remove, removeAllWithHash, removeMapping, removeNoReturn, replace, replace, shrink, size, values |
| Methods inherited from class org.terracotta.offheapstore.OffHeapHashMap |
added, encodingSet, 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, readLong, readLong, removeAtTableOffset, removed, shrinkTable, spread, storageEngineFailure, tableExpansionFailure, tryIncreaseReprobe, updated, updateEncoding |
| Methods inherited from interface org.terracotta.offheapstore.MapInternals |
getAllocatedMemory, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSize, getTableCapacity, getUsedSlotCount, getVitalMemory |
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)
readLock
public Lock readLock()
- Specified by:
readLock in interface ReadWriteLock- Specified by:
readLock in class AbstractLockedOffHeapHashMap<K,V>
writeLock
public Lock writeLock()
- Specified by:
writeLock in interface ReadWriteLock- Specified by:
writeLock in class AbstractLockedOffHeapHashMap<K,V>
getLock
public ReentrantReadWriteLock getLock()
- Description copied from interface:
Segment
- Return the
ReentrantReadWriteLock used by this segment.
- Returns:
- RRWL for this segment
Copyright © 2016. All Rights Reserved.