Class ConcurrentOffHeapHashMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap<K,V>
org.terracotta.offheapstore.concurrent.ConcurrentOffHeapHashMap<K,V>
- Type Parameters:
K- the type of keys maintained by this mapV- the type of mapped values
- All Implemented Interfaces:
ConcurrentMap<K,V>, Map<K, V>, ConcurrentMapInternals, HashingMap<K, V>, MapInternals
A striped concurrent-read/exclusive-write map.
This implementation uses instances of ReadWriteLockedOffHeapHashMap
for its segments.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractConcurrentOffHeapMap
AbstractConcurrentOffHeapMap.AggregatedValuesCollection, AbstractConcurrentOffHeapMap.AggregateEntrySet, AbstractConcurrentOffHeapMap.AggregateIterator<T>, AbstractConcurrentOffHeapMap.AggregateKeySetNested classes/interfaces inherited from class AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields inherited from class AbstractConcurrentOffHeapMap
segments -
Constructor Summary
ConstructorsConstructorDescriptionConcurrentOffHeapHashMap(PageSource tableSource, boolean tableAllocationsSteal, Factory<? extends StorageEngine<? super K, ? super V>> storageEngineFactory) ConcurrentOffHeapHashMap(PageSource tableSource, boolean tableAllocationsSteal, Factory<? extends StorageEngine<? super K, ? super V>> storageEngineFactory, long tableSize, int concurrency) ConcurrentOffHeapHashMap(PageSource tableSource, Factory<? extends StorageEngine<? super K, ? super V>> storageEngineFactory) Creates a map using the given table buffer source and storage engine factory.ConcurrentOffHeapHashMap(PageSource tableSource, Factory<? extends StorageEngine<? super K, ? super V>> storageEngineFactory, long tableSize, int concurrency) Creates a map using the given table buffer source, storage engine factory, initial table size, and concurrency. -
Method Summary
Methods inherited from class AbstractConcurrentOffHeapMap
clear, computeIfAbsentWithMetadata, computeIfPresentWithMetadata, computeWithMetadata, containsKey, containsValue, destroy, entrySet, fill, fill, get, getAllocatedMemory, getAndSetMetadata, getConcurrency, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getIndexFor, getMetadata, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSegmentInternals, getSegments, getSize, getTableCapacity, getUsedSlotCount, getValueAndSetMetadata, getVitalMemory, handleOversizeMappingException, keySet, put, put, putIfAbsent, readLockAll, readUnlockAll, remove, remove, removeAllWithHash, removeNoReturn, replace, replace, segmentFor, segmentFor, size, values, writeLockAll, writeUnlockAllMethods inherited from interface ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
-
Constructor Details
-
ConcurrentOffHeapHashMap
public ConcurrentOffHeapHashMap(PageSource tableSource, Factory<? extends StorageEngine<? super K, ? super V>> storageEngineFactory) Creates a map using the given table buffer source and storage engine factory.- Parameters:
tableSource- buffer source from which hash tables are allocatedstorageEngineFactory- factory for the segment storage engines
-
ConcurrentOffHeapHashMap
public ConcurrentOffHeapHashMap(PageSource tableSource, boolean tableAllocationsSteal, Factory<? extends StorageEngine<? super K, ? super V>> storageEngineFactory) -
ConcurrentOffHeapHashMap
public ConcurrentOffHeapHashMap(PageSource tableSource, Factory<? extends StorageEngine<? super K, ? super V>> storageEngineFactory, long tableSize, int concurrency) Creates a map using the given table buffer source, storage engine factory, initial table size, and concurrency.- Parameters:
tableSource- buffer source from which hash tables are allocatedstorageEngineFactory- factory for the segment storage enginestableSize- initial table size (summed across all segments)concurrency- number of segments
-
ConcurrentOffHeapHashMap
public ConcurrentOffHeapHashMap(PageSource tableSource, boolean tableAllocationsSteal, Factory<? extends StorageEngine<? super K, ? super V>> storageEngineFactory, long tableSize, int concurrency)
-