org.terracotta.offheapstore.concurrent
Class ConcurrentOffHeapHashMap<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap<K,V>
          extended by org.terracotta.offheapstore.concurrent.ConcurrentOffHeapHashMap<K,V>
Type Parameters:
K - the type of keys maintained by this map
V - the type of mapped values
All Implemented Interfaces:
ConcurrentMap<K,V>, Map<K,V>, ConcurrentMapInternals, MapInternals

public class ConcurrentOffHeapHashMap<K,V>
extends AbstractConcurrentOffHeapMap<K,V>

A striped concurrent-read/exclusive-write map.

This implementation uses instances of ReadWriteLockedOffHeapHashMap for its segments.

Author:
Chris Dennis
See Also:
ReadWriteLockedOffHeapHashMap

Nested Class Summary
 
Nested classes/interfaces inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap
AbstractConcurrentOffHeapMap.AggregateIterator<T>
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap
segments
 
Constructor Summary
ConcurrentOffHeapHashMap(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, boolean latencyMonitoring)
           
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 org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap
clear, containsKey, containsValue, destroy, entrySet, fill, fill, get, getAllocatedMemory, getConcurrency, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getIndexFor, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSegmentInternals, getSegments, getSize, getTableCapacity, getUsedSlotCount, getVitalMemory, handleOversizeMappingException, keySet, put, put, putIfAbsent, readLockAll, readUnlockAll, remove, remove, removeNoReturn, replace, replace, segmentFor, segmentFor, size, updateMetadata, values, writeLockAll, writeUnlockAll
 
Methods inherited from class java.util.AbstractMap
clone, equals, hashCode, isEmpty, putAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty, putAll
 

Constructor Detail

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 allocated
storageEngineFactory - 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,
                                boolean latencyMonitoring)

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 allocated
storageEngineFactory - factory for the segment storage engines
tableSize - 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)


Copyright © 2015. All Rights Reserved.