Class ReadWriteLockedOffHeapClockCacheFactory<K,V>
- java.lang.Object
-
- org.terracotta.offheapstore.concurrent.ReadWriteLockedOffHeapClockCacheFactory<K,V>
-
- Type Parameters:
K- the type of keys held by the generated cachesV- the type of mapped values
- All Implemented Interfaces:
Factory<ReadWriteLockedOffHeapClockCache<K,V>>
public class ReadWriteLockedOffHeapClockCacheFactory<K,V> extends java.lang.Object implements Factory<ReadWriteLockedOffHeapClockCache<K,V>>
Factory ofReadWriteLockedOffHeapClockCacheinstances.
-
-
Field Summary
Fields Modifier and Type Field Description private static intDEFAULT_TABLE_SIZEprivate EvictionListener<K,V>evictionListenerprivate Factory<? extends StorageEngine<? super K,? super V>>storageEngineFactoryprivate inttableSizeprivate PageSourcetableSource
-
Constructor Summary
Constructors Constructor Description ReadWriteLockedOffHeapClockCacheFactory(PageSource tableSource, Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory)Creates segments using the given table buffer source and storage engine factory.ReadWriteLockedOffHeapClockCacheFactory(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.ReadWriteLockedOffHeapClockCacheFactory(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.ReadWriteLockedOffHeapClockCacheFactory(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReadWriteLockedOffHeapClockCache<K,V>newInstance()Creates a newReadWriteLockedOffHeapClockCachefor use in a segmented cache.
-
-
-
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
-
tableSize
private final int tableSize
-
evictionListener
private final EvictionListener<K,V> evictionListener
-
-
Constructor Detail
-
ReadWriteLockedOffHeapClockCacheFactory
public ReadWriteLockedOffHeapClockCacheFactory(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
-
ReadWriteLockedOffHeapClockCacheFactory
public ReadWriteLockedOffHeapClockCacheFactory(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
-
ReadWriteLockedOffHeapClockCacheFactory
public ReadWriteLockedOffHeapClockCacheFactory(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
-
ReadWriteLockedOffHeapClockCacheFactory
public ReadWriteLockedOffHeapClockCacheFactory(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 Detail
-
newInstance
public ReadWriteLockedOffHeapClockCache<K,V> newInstance()
Creates a newReadWriteLockedOffHeapClockCachefor use in a segmented cache.- Specified by:
newInstancein interfaceFactory<K>- Returns:
- a new
ReadWriteLockedOffHeapClockCache
-
-