Class ReadWriteLockedOffHeapHashMap<K,​V>

  • Type Parameters:
    K - the type of keys maintained by this map
    V - the type of mapped values
    All Implemented Interfaces:
    java.util.concurrent.ConcurrentMap<K,​V>, java.util.concurrent.locks.ReadWriteLock, java.util.Map<K,​V>, HashingMap<K,​V>, MapInternals, Segment<K,​V>, StorageEngine.Owner

    public class ReadWriteLockedOffHeapHashMap<K,​V>
    extends AbstractLockedOffHeapHashMap<K,​V>
    A concurrent-read, exclusive-write off-heap hash-map.

    This map uses a regular ReentrantReadWriteLock to provide read/write exclusion/sharing properties.

    • Field Detail

      • lock

        private final java.util.concurrent.locks.ReentrantReadWriteLock lock
    • Constructor Detail

      • ReadWriteLockedOffHeapHashMap

        public ReadWriteLockedOffHeapHashMap​(PageSource tableSource,
                                             StorageEngine<? super K,​? super V> storageEngine)
      • ReadWriteLockedOffHeapHashMap

        public ReadWriteLockedOffHeapHashMap​(PageSource tableSource,
                                             boolean tableAllocationsSteal,
                                             StorageEngine<? super K,​? super V> storageEngine)
      • ReadWriteLockedOffHeapHashMap

        public ReadWriteLockedOffHeapHashMap​(PageSource tableSource,
                                             StorageEngine<? super K,​? super V> storageEngine,
                                             int tableSize)
      • ReadWriteLockedOffHeapHashMap

        public ReadWriteLockedOffHeapHashMap​(PageSource tableSource,
                                             boolean tableAllocationsSteal,
                                             StorageEngine<? super K,​? super V> storageEngine,
                                             int tableSize)
    • Method Detail

      • readLock

        public java.util.concurrent.locks.Lock readLock()
        Specified by:
        readLock in interface java.util.concurrent.locks.ReadWriteLock
        Specified by:
        readLock in class AbstractLockedOffHeapHashMap<K,​V>
      • writeLock

        public java.util.concurrent.locks.Lock writeLock()
        Specified by:
        writeLock in interface java.util.concurrent.locks.ReadWriteLock
        Specified by:
        writeLock in class AbstractLockedOffHeapHashMap<K,​V>
      • getLock

        public java.util.concurrent.locks.ReentrantReadWriteLock getLock()
        Description copied from interface: Segment
        Return the ReentrantReadWriteLock used by this segment.
        Returns:
        RRWL for this segment