Class WriteLockedOffHeapHashMapFactory<K,V>
java.lang.Object
org.terracotta.offheapstore.concurrent.WriteLockedOffHeapHashMapFactory<K,V>
- Type Parameters:
K- the type of keys held by the generated mapsV- the type of mapped values
- All Implemented Interfaces:
Factory<WriteLockedOffHeapHashMap<K,V>>
public class WriteLockedOffHeapHashMapFactory<K,V>
extends Object
implements Factory<WriteLockedOffHeapHashMap<K,V>>
Factory of
WriteLockedOffHeapHashMap instances.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate final Factory<? extends StorageEngine<? super K, ? super V>> private final intprivate final PageSource -
Constructor Summary
ConstructorsConstructorDescriptionWriteLockedOffHeapHashMapFactory(PageSource tableSource, Factory<? extends StorageEngine<? super K, ? super V>> storageEngineFactory) Creates segments using the given table buffer source and storage engine factory.WriteLockedOffHeapHashMapFactory(PageSource tableSource, 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. -
Method Summary
Modifier and TypeMethodDescriptionCreates a newWriteLockedOffHeapHashMapfor use in a segmented map.
-
Field Details
-
DEFAULT_TABLE_SIZE
private static final int DEFAULT_TABLE_SIZE- See Also:
-
storageEngineFactory
-
tableSource
-
tableSize
private final int tableSize
-
-
Constructor Details
-
WriteLockedOffHeapHashMapFactory
public WriteLockedOffHeapHashMapFactory(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
-
WriteLockedOffHeapHashMapFactory
public WriteLockedOffHeapHashMapFactory(PageSource tableSource, 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 allocatedstorageEngineFactory- factory for the segment storage enginestableSize- initial table size for each segment
-
-
Method Details
-
newInstance
Creates a newWriteLockedOffHeapHashMapfor use in a segmented map.- Specified by:
newInstancein interfaceFactory<K>- Returns:
- a new
WriteLockedOffHeapHashMap
-