org.terracotta.offheapstore.disk.persistent
Class PersistentReadWriteLockedOffHeapClockCache<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by org.terracotta.offheapstore.OffHeapHashMap<K,V>
          extended by org.terracotta.offheapstore.AbstractLockedOffHeapHashMap<K,V>
              extended by org.terracotta.offheapstore.AbstractOffHeapClockCache<K,V>
                  extended by org.terracotta.offheapstore.disk.persistent.AbstractPersistentOffHeapCache<K,V>
                      extended by org.terracotta.offheapstore.disk.persistent.PersistentReadWriteLockedOffHeapClockCache<K,V>
All Implemented Interfaces:
ConcurrentMap<K,V>, ReadWriteLock, Map<K,V>, Persistent, HashingMap<K,V>, MapInternals, PinnableCache<K,V>, PinnableSegment<K,V>, Segment<K,V>, StorageEngine.Owner

public class PersistentReadWriteLockedOffHeapClockCache<K,V>
extends AbstractPersistentOffHeapCache<K,V>

Author:
Chris Dennis

Nested Class Summary
 
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.OffHeapHashMap
ENCODING, ENTRY_BIT_SHIFT, ENTRY_SIZE, hashtable, hashTablePage, KEY_HASHCODE, modCount, removedSlots, reprobeLimit, RESERVED_STATUS_BITS, size, STATUS, STATUS_REMOVED, STATUS_USED, storageEngine, tableSource
 
Constructor Summary
PersistentReadWriteLockedOffHeapClockCache(MappedPageSource source, PersistentStorageEngine<? super K,? super V> storageEngine, boolean bootstrap)
           
PersistentReadWriteLockedOffHeapClockCache(MappedPageSource source, PersistentStorageEngine<? super K,? super V> storageEngine, int tableSize, boolean bootstrap)
           
 
Method Summary
 ReentrantReadWriteLock getLock()
          Return the ReentrantReadWriteLock used by this segment.
 Lock readLock()
           
 Lock writeLock()
           
 
Methods inherited from class org.terracotta.offheapstore.disk.persistent.AbstractPersistentOffHeapCache
bootstrap, close, flush, persist
 
Methods inherited from class org.terracotta.offheapstore.AbstractOffHeapClockCache
evict, evictable, getAndPin, getEvictionIndex, hit, isPinned, putPinned, setPinning, storageEngineFailure, tableExpansionFailure
 
Methods inherited from class org.terracotta.offheapstore.AbstractLockedOffHeapHashMap
clear, computeIfAbsentWithMetadata, computeIfPresentWithMetadata, computeWithMetadata, containsKey, destroy, entrySet, fill, fill, get, getAndSetMetadata, getEncodingForHashAndBinary, getMetadata, getValueAndSetMetadata, installMappingForHashAndEncoding, keySet, put, put, putIfAbsent, remove, remove, removeAllWithHash, removeMapping, removeNoReturn, replace, replace, shrink, size, values
 
Methods inherited from class org.terracotta.offheapstore.OffHeapHashMap
added, encodingSet, fill, freePendingTables, getAllocatedMemory, getAtTableOffset, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getEntryAtTableOffset, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSize, getSlotForHashAndEncoding, getStorageEngine, getTableCapacity, getUsedSlotCount, getVitalMemory, indexFor, indexFor, isAvailable, isPresent, isRemoved, isRemoved, isTerminating, isTerminating, isThiefForTableAllocations, readLong, readLong, removeAtTableOffset, removed, shrinkTable, spread, tryIncreaseReprobe, updated, updateEncoding
 
Methods inherited from class java.util.AbstractMap
clone, containsValue, equals, hashCode, isEmpty, putAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.terracotta.offheapstore.Segment
computeIfAbsentWithMetadata, computeIfPresentWithMetadata, computeWithMetadata, destroy, fill, fill, getAndSetMetadata, getMetadata, getValueAndSetMetadata, put, removeNoReturn, shrink
 
Methods inherited from interface org.terracotta.offheapstore.MapInternals
getAllocatedMemory, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSize, getTableCapacity, getUsedSlotCount, getVitalMemory
 
Methods inherited from interface org.terracotta.offheapstore.HashingMap
removeAllWithHash
 
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

PersistentReadWriteLockedOffHeapClockCache

public PersistentReadWriteLockedOffHeapClockCache(MappedPageSource source,
                                                  PersistentStorageEngine<? super K,? super V> storageEngine,
                                                  boolean bootstrap)

PersistentReadWriteLockedOffHeapClockCache

public PersistentReadWriteLockedOffHeapClockCache(MappedPageSource source,
                                                  PersistentStorageEngine<? super K,? super V> storageEngine,
                                                  int tableSize,
                                                  boolean bootstrap)
Method Detail

readLock

public Lock readLock()
Specified by:
readLock in interface ReadWriteLock
Specified by:
readLock in class AbstractLockedOffHeapHashMap<K,V>

writeLock

public Lock writeLock()
Specified by:
writeLock in interface ReadWriteLock
Specified by:
writeLock in class AbstractLockedOffHeapHashMap<K,V>

getLock

public ReentrantReadWriteLock getLock()
Description copied from interface: Segment
Return the ReentrantReadWriteLock used by this segment.

Returns:
RRWL for this segment


Copyright © 2016. All Rights Reserved.