org.terracotta.offheapstore.concurrent
Class ConcurrentOffHeapClockCache<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap<K,V>
org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapCache<K,V>
org.terracotta.offheapstore.concurrent.ConcurrentOffHeapClockCache<K,V>
- Type Parameters:
K - the type of keys maintained by this cacheV - the type of mapped values
- All Implemented Interfaces:
- ConcurrentMap<K,V>, Map<K,V>, ConcurrentMapInternals, MapInternals, PinnableCache<K,V>
public class ConcurrentOffHeapClockCache<K,V>
- extends AbstractConcurrentOffHeapCache<K,V>
A striped concurrent-read/exclusive-write clock cache.
This implementation uses instances of ReadWriteLockedOffHeapClockCache
for its segments.
- Author:
- Chris Dennis
- See Also:
ReadWriteLockedOffHeapClockCache
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
|
Constructor Summary |
ConcurrentOffHeapClockCache(Factory<? extends AbstractOffHeapClockCache<K,V>> segmentFactory,
int concurrency)
Creates a cache using the given table buffer source and storage engine
factory. |
ConcurrentOffHeapClockCache(PageSource tableSource,
Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory)
Creates a cache using the given table buffer source and storage engine
factory. |
ConcurrentOffHeapClockCache(PageSource tableSource,
Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory,
EvictionListener<K,V> evictionListener)
Creates a cache using the given table buffer source and storage engine
factory. |
ConcurrentOffHeapClockCache(PageSource tableSource,
Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory,
EvictionListener<K,V> evictionListener,
long tableSize,
int concurrency)
Creates a cache using the given table buffer source, storage engine
factory, initial table size, and concurrency. |
ConcurrentOffHeapClockCache(PageSource tableSource,
Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory,
long tableSize,
int concurrency)
Creates a cache using the given table buffer source, storage engine
factory, initial table size, and concurrency. |
| Methods inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap |
clear, containsKey, containsValue, destroy, entrySet, 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, size, updateMetadata, values, writeLockAll, writeUnlockAll |
| Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
ConcurrentOffHeapClockCache
public ConcurrentOffHeapClockCache(Factory<? extends AbstractOffHeapClockCache<K,V>> segmentFactory,
int concurrency)
- Creates a cache using the given table buffer source and storage engine
factory.
- Parameters:
segmentFactory - the factory to use to build segmentsconcurrency -
ConcurrentOffHeapClockCache
public ConcurrentOffHeapClockCache(PageSource tableSource,
Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory)
- Creates a cache using the given table buffer source and storage engine
factory.
- Parameters:
tableSource - buffer source from which hash tables are allocatedstorageEngineFactory - factory for the segment storage engines
ConcurrentOffHeapClockCache
public ConcurrentOffHeapClockCache(PageSource tableSource,
Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory,
EvictionListener<K,V> evictionListener)
- Creates a cache using the given table buffer source and storage engine
factory.
- Parameters:
tableSource - buffer source from which hash tables are allocatedstorageEngineFactory - factory for the segment storage enginesevictionListener - listener notified on evictions
ConcurrentOffHeapClockCache
public ConcurrentOffHeapClockCache(PageSource tableSource,
Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory,
long tableSize,
int concurrency)
- Creates a cache using the given table buffer source, storage engine
factory, initial table size, and concurrency.
- Parameters:
tableSource - buffer source from which hash tables are allocatedstorageEngineFactory - factory for the segment storage enginestableSize - initial table size (summed across all segments)concurrency - number of segments
ConcurrentOffHeapClockCache
public ConcurrentOffHeapClockCache(PageSource tableSource,
Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory,
EvictionListener<K,V> evictionListener,
long tableSize,
int concurrency)
- Creates a cache using the given table buffer source, storage engine
factory, initial table size, and concurrency.
- Parameters:
tableSource - buffer source from which hash tables are allocatedstorageEngineFactory - factory for the segment storage enginesevictionListener - listener notified on evictionstableSize - initial table size (summed across all segments)concurrency - number of segments
Copyright © 2015. All Rights Reserved.