Class ReadWriteLockedOffHeapHashMapFactory<K,V>
- java.lang.Object
-
- org.terracotta.offheapstore.concurrent.ReadWriteLockedOffHeapHashMapFactory<K,V>
-
- Type Parameters:
K- the type of keys held by the generated mapsV- the type of mapped values
- All Implemented Interfaces:
Factory<ReadWriteLockedOffHeapHashMap<K,V>>
public class ReadWriteLockedOffHeapHashMapFactory<K,V> extends java.lang.Object implements Factory<ReadWriteLockedOffHeapHashMap<K,V>>
Factory ofReadWriteLockedOffHeapHashMapinstances.
-
-
Field Summary
Fields Modifier and Type Field Description private static intDEFAULT_TABLE_SIZEprivate Factory<? extends StorageEngine<? super K,? super V>>storageEngineFactoryprivate booleantableAllocationsStealprivate inttableSizeprivate PageSourcetableSource
-
Constructor Summary
Constructors Constructor Description ReadWriteLockedOffHeapHashMapFactory(PageSource tableSource, boolean tableAllocationsSteal, Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory)ReadWriteLockedOffHeapHashMapFactory(PageSource tableSource, boolean tableAllocationsSteal, Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory, int tableSize)Creates segments using the given table buffer source, storage engine factory, and initial table size.ReadWriteLockedOffHeapHashMapFactory(PageSource tableSource, Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory)Creates segments using the given table buffer source and storage engine factory.ReadWriteLockedOffHeapHashMapFactory(PageSource tableSource, Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory, int tableSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReadWriteLockedOffHeapHashMap<K,V>newInstance()Creates a newReadWriteLockedOffHeapHashMapfor use in a segmented map.
-
-
-
Field Detail
-
DEFAULT_TABLE_SIZE
private static final int DEFAULT_TABLE_SIZE
- See Also:
- Constant Field Values
-
storageEngineFactory
private final Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory
-
tableSource
private final PageSource tableSource
-
tableAllocationsSteal
private final boolean tableAllocationsSteal
-
tableSize
private final int tableSize
-
-
Constructor Detail
-
ReadWriteLockedOffHeapHashMapFactory
public ReadWriteLockedOffHeapHashMapFactory(PageSource tableSource, Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory)
Creates segments using the given table buffer source and storage engine factory.- Parameters:
tableSource- buffer source from which the segment hash tables are allocatedstorageEngineFactory- factory for the segment storage engines
-
ReadWriteLockedOffHeapHashMapFactory
public ReadWriteLockedOffHeapHashMapFactory(PageSource tableSource, boolean tableAllocationsSteal, Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory)
-
ReadWriteLockedOffHeapHashMapFactory
public ReadWriteLockedOffHeapHashMapFactory(PageSource tableSource, Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory, int tableSize)
-
ReadWriteLockedOffHeapHashMapFactory
public ReadWriteLockedOffHeapHashMapFactory(PageSource tableSource, boolean tableAllocationsSteal, Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory, int tableSize)
Creates segments using the given table buffer source, storage engine factory, and initial table size.- Parameters:
tableSource- buffer source from which the segment hash tables are allocatedtableAllocationsSteal- whether table allocations should stealstorageEngineFactory- factory for the segment storage enginestableSize- initial table size for each segment
-
-
Method Detail
-
newInstance
public ReadWriteLockedOffHeapHashMap<K,V> newInstance()
Creates a newReadWriteLockedOffHeapHashMapfor use in a segmented map.- Specified by:
newInstancein interfaceFactory<K>- Returns:
- a new
ReadWriteLockedOffHeapHashMap
-
-