org.terracotta.offheapstore.disk.persistent
Class PersistentReadWriteLockedOffHeapHashMap<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.disk.persistent.AbstractPersistentLockedOffHeapHashMap<K,V>
                  extended by org.terracotta.offheapstore.disk.persistent.PersistentReadWriteLockedOffHeapHashMap<K,V>
All Implemented Interfaces:
ConcurrentMap<K,V>, ReadWriteLock, Map<K,V>, Persistent, MapInternals, Segment<K,V>, StorageEngine.Owner

public class PersistentReadWriteLockedOffHeapHashMap<K,V>
extends AbstractPersistentLockedOffHeapHashMap<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
ENTRY_SIZE, hashtable, hashTablePage, modCount, removedSlots, reprobeLimit, RESERVED_STATUS_BITS, size, STATUS, STATUS_USED, storageEngine, tableSource
 
Constructor Summary
PersistentReadWriteLockedOffHeapHashMap(MappedPageSource tableSource, PersistentStorageEngine<? super K,? super V> storageEngine, boolean bootstrap)
           
PersistentReadWriteLockedOffHeapHashMap(MappedPageSource tableSource, 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.AbstractPersistentLockedOffHeapHashMap
bootstrap, close, flush, persist
 
Methods inherited from class org.terracotta.offheapstore.AbstractLockedOffHeapHashMap
clear, containsKey, destroy, entrySet, evict, fill, fill, get, getAndSetMetadata, getEncodingForHashAndBinary, getMetadata, getValueAndSetMetadata, installMappingForHashAndEncoding, keySet, put, put, putIfAbsent, remove, remove, removeMapping, removeNoReturn, replace, replace, shrink, size, values
 
Methods inherited from class org.terracotta.offheapstore.OffHeapHashMap
added, encodingSet, fill, getAllocatedMemory, getAtTableOffset, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getEntryAtTableOffset, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSize, getSlotForHashAndEncoding, getStorageEngine, getTableCapacity, getUsedSlotCount, getVitalMemory, hit, isAvailable, isPresent, isRemoved, isTerminating, isThiefForTableAllocations, removeAtTableOffset, removed, spread, storageEngineFailure, tableExpansionFailure, 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 java.util.Map
containsValue, equals, hashCode, isEmpty, putAll
 
Methods inherited from interface org.terracotta.offheapstore.MapInternals
getAllocatedMemory, getDataAllocatedMemory, getDataOccupiedMemory, getDataSize, getDataVitalMemory, getOccupiedMemory, getRemovedSlotCount, getReprobeLength, getSize, getTableCapacity, getUsedSlotCount, getVitalMemory
 

Constructor Detail

PersistentReadWriteLockedOffHeapHashMap

public PersistentReadWriteLockedOffHeapHashMap(MappedPageSource tableSource,
                                               PersistentStorageEngine<? super K,? super V> storageEngine,
                                               boolean bootstrap)

PersistentReadWriteLockedOffHeapHashMap

public PersistentReadWriteLockedOffHeapHashMap(MappedPageSource tableSource,
                                               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 © 2015. All Rights Reserved.