org.terracotta.offheapstore.concurrent
Class ConcurrentWriteLockedOffHeapClockCache<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap<K,V>
          extended by org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapCache<K,V>
              extended by org.terracotta.offheapstore.concurrent.ConcurrentWriteLockedOffHeapClockCache<K,V>
Type Parameters:
K - the type of keys maintained by this cache
V - the type of mapped values
All Implemented Interfaces:
ConcurrentMap<K,V>, Map<K,V>, ConcurrentMapInternals, HashingMap<K,V>, MapInternals, PinnableCache<K,V>

public class ConcurrentWriteLockedOffHeapClockCache<K,V>
extends AbstractConcurrentOffHeapCache<K,V>

A striped exclusive-read/write clock cache.

This implementation uses instances of WriteLockedOffHeapClockCache for its segments.

Author:
Chris Dennis
See Also:
WriteLockedOffHeapClockCache

Nested Class Summary
 
Nested classes/interfaces inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap
AbstractConcurrentOffHeapMap.AggregateIterator<T>
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap
segments
 
Constructor Summary
ConcurrentWriteLockedOffHeapClockCache(PageSource tableSource, Factory<? extends StorageEngine<? super K,? super V>> storageEngineFactory)
          Creates a cache using the given table buffer source and storage engine factory.
ConcurrentWriteLockedOffHeapClockCache(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.
ConcurrentWriteLockedOffHeapClockCache(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.
ConcurrentWriteLockedOffHeapClockCache(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.
 
Method Summary
 
Methods inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapCache
fill, getAndPin, isPinned, putPinned, segmentFor, setPinning, shrink, shrinkOthers
 
Methods inherited from class org.terracotta.offheapstore.concurrent.AbstractConcurrentOffHeapMap
clear, computeIfAbsentWithMetadata, computeIfPresentWithMetadata, computeWithMetadata, containsKey, containsValue, destroy, entrySet, fill, get, getAllocatedMemory, getAndSetMetadata, getConcurrency, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getIndexFor, getMetadata, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSegmentInternals, getSegments, getSize, getTableCapacity, getUsedSlotCount, getValueAndSetMetadata, getVitalMemory, handleOversizeMappingException, keySet, put, put, putIfAbsent, readLockAll, readUnlockAll, remove, remove, removeAllWithHash, removeNoReturn, replace, replace, segmentFor, size, values, writeLockAll, writeUnlockAll
 
Methods inherited from class java.util.AbstractMap
clone, equals, hashCode, isEmpty, putAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.concurrent.ConcurrentMap
putIfAbsent, remove, replace, replace
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

ConcurrentWriteLockedOffHeapClockCache

public ConcurrentWriteLockedOffHeapClockCache(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 allocated
storageEngineFactory - factory for the segment storage engines

ConcurrentWriteLockedOffHeapClockCache

public ConcurrentWriteLockedOffHeapClockCache(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 allocated
storageEngineFactory - factory for the segment storage engines
evictionListener - listener notified on evictions

ConcurrentWriteLockedOffHeapClockCache

public ConcurrentWriteLockedOffHeapClockCache(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 allocated
storageEngineFactory - factory for the segment storage engines
tableSize - initial table size (summed across all segments)
concurrency - number of segments

ConcurrentWriteLockedOffHeapClockCache

public ConcurrentWriteLockedOffHeapClockCache(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 allocated
storageEngineFactory - factory for the segment storage engines
evictionListener - listener notified on evictions
tableSize - initial table size (summed across all segments)
concurrency - number of segments


Copyright © 2016. All rights reserved.