Class WriteLockedOffHeapClockCacheFactory<K,V>
java.lang.Object
org.terracotta.offheapstore.concurrent.WriteLockedOffHeapClockCacheFactory<K,V>
- Type Parameters:
K- the type of keys held by the generated cachesV- the type of mapped values
- All Implemented Interfaces:
Factory<WriteLockedOffHeapClockCache<K,V>>
public class WriteLockedOffHeapClockCacheFactory<K,V>
extends Object
implements Factory<WriteLockedOffHeapClockCache<K,V>>
Factory of
WriteLockedOffHeapClockCache instances.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate final EvictionListener<K, V> private final Factory<? extends StorageEngine<? super K, ? super V>> private final intprivate final PageSource -
Constructor Summary
ConstructorsConstructorDescriptionWriteLockedOffHeapClockCacheFactory(PageSource tableSource, Factory<? extends StorageEngine<? super K, ? super V>> storageEngineFactory) Creates segments using the given table buffer source and storage engine factory.WriteLockedOffHeapClockCacheFactory(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.WriteLockedOffHeapClockCacheFactory(PageSource tableSource, Factory<? extends StorageEngine<? super K, ? super V>> storageEngineFactory, EvictionListener<K, V> evictionListener) Creates segments using the given table buffer source and storage engine factory.WriteLockedOffHeapClockCacheFactory(PageSource tableSource, Factory<? extends StorageEngine<? super K, ? super V>> storageEngineFactory, EvictionListener<K, V> evictionListener, int tableSize) Creates segments using the given table buffer source, storage engine factory, eviction listener and initial table size. -
Method Summary
Modifier and TypeMethodDescriptionCreates a newWriteLockedOffHeapClockCachefor use in a segmented cache.
-
Field Details
-
DEFAULT_TABLE_SIZE
private static final int DEFAULT_TABLE_SIZE- See Also:
-
storageEngineFactory
-
tableSource
-
tableSize
private final int tableSize -
evictionListener
-
-
Constructor Details
-
WriteLockedOffHeapClockCacheFactory
public WriteLockedOffHeapClockCacheFactory(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
-
WriteLockedOffHeapClockCacheFactory
public WriteLockedOffHeapClockCacheFactory(PageSource tableSource, Factory<? extends StorageEngine<? super K, ? super V>> storageEngineFactory, EvictionListener<K, V> evictionListener) 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 enginesevictionListener- listener notified on evictions
-
WriteLockedOffHeapClockCacheFactory
public WriteLockedOffHeapClockCacheFactory(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
-
WriteLockedOffHeapClockCacheFactory
public WriteLockedOffHeapClockCacheFactory(PageSource tableSource, Factory<? extends StorageEngine<? super K, ? super V>> storageEngineFactory, EvictionListener<K, V> evictionListener, int tableSize) Creates segments using the given table buffer source, storage engine factory, eviction listener and initial table size.- Parameters:
tableSource- buffer source from which the segment hash tables are allocatedstorageEngineFactory- factory for the segment storage enginesevictionListener- listener notified on evictionstableSize- initial table size for each segment
-
-
Method Details
-
newInstance
Creates a newWriteLockedOffHeapClockCachefor use in a segmented cache.- Specified by:
newInstancein interfaceFactory<K>- Returns:
- a new
WriteLockedOffHeapClockCache
-