Package com.google.common.collect
Class MapMakerInternalMap.StrongKeyStrongValueSegment<K,V>
java.lang.Object
java.util.concurrent.locks.ReentrantLock
com.google.common.collect.MapMakerInternalMap.Segment<K,V,MapMakerInternalMap.StrongKeyStrongValueEntry<K,V>,MapMakerInternalMap.StrongKeyStrongValueSegment<K,V>>
com.google.common.collect.MapMakerInternalMap.StrongKeyStrongValueSegment<K,V>
- All Implemented Interfaces:
Serializable,Lock
- Enclosing class:
- MapMakerInternalMap<K,
V, E extends MapMakerInternalMap.InternalEntry<K, V, E>, S extends MapMakerInternalMap.Segment<K, V, E, S>>
static final class MapMakerInternalMap.StrongKeyStrongValueSegment<K,V>
extends MapMakerInternalMap.Segment<K,V,MapMakerInternalMap.StrongKeyStrongValueEntry<K,V>,MapMakerInternalMap.StrongKeyStrongValueSegment<K,V>>
Concrete implementation of
MapMakerInternalMap.Segment for strong keys and strong values.-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionStrongKeyStrongValueSegment(MapMakerInternalMap<K, V, MapMakerInternalMap.StrongKeyStrongValueEntry<K, V>, MapMakerInternalMap.StrongKeyStrongValueSegment<K, V>> map, int initialCapacity) -
Method Summary
Modifier and TypeMethodDescriptioncastForTesting(MapMakerInternalMap.InternalEntry<K, V, ?> entry) Unsafe cast of the given entry toE, the type of the specificMapMakerInternalMap.InternalEntryimplementation type.(package private) MapMakerInternalMap.StrongKeyStrongValueSegment<K,V> self()Methods inherited from class com.google.common.collect.MapMakerInternalMap.Segment
clear, clearReferenceQueue, clearValueForTesting, containsKey, containsValue, copyEntry, copyForTesting, drainKeyReferenceQueue, drainValueReferenceQueue, expand, get, getEntry, getFirst, getKeyReferenceQueueForTesting, getLiveEntry, getLiveValue, getLiveValueForTesting, getValueReferenceQueueForTesting, getWeakValueReferenceForTesting, initTable, isCollected, maybeClearReferenceQueues, maybeDrainReferenceQueues, newEntryArray, newEntryForTesting, newWeakValueReferenceForTesting, postReadCleanup, preWriteCleanup, put, reclaimKey, reclaimValue, remove, remove, removeEntryForTesting, removeFromChain, removeFromChainForTesting, removeTableEntryForTesting, replace, replace, runCleanup, runLockedCleanup, setTableEntryForTesting, setValue, setValueForTesting, setWeakValueReferenceForTesting, tryDrainReferenceQueuesMethods inherited from class java.util.concurrent.locks.ReentrantLock
getHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, isLocked, lock, lockInterruptibly, newCondition, toString, tryLock, tryLock, unlock
-
Constructor Details
-
StrongKeyStrongValueSegment
StrongKeyStrongValueSegment(MapMakerInternalMap<K, V, MapMakerInternalMap.StrongKeyStrongValueEntry<K, V>, MapMakerInternalMap.StrongKeyStrongValueSegment<K, V>> map, int initialCapacity)
-
-
Method Details
-
self
Description copied from class:MapMakerInternalMap.SegmentReturnsthisup-casted to the specificMapMakerInternalMap.Segmentimplementation typeS.This method exists so that the
MapMakerInternalMap.Segmentcode can be generic in terms ofS, the type of the concrete implementation.- Specified by:
selfin classMapMakerInternalMap.Segment<K,V, MapMakerInternalMap.StrongKeyStrongValueEntry<K, V>, MapMakerInternalMap.StrongKeyStrongValueSegment<K, V>>
-
castForTesting
@CheckForNull public MapMakerInternalMap.StrongKeyStrongValueEntry<K,V> castForTesting(@CheckForNull MapMakerInternalMap.InternalEntry<K, V, ?> entry) Description copied from class:MapMakerInternalMap.SegmentUnsafe cast of the given entry toE, the type of the specificMapMakerInternalMap.InternalEntryimplementation type.This method is provided as a convenience for tests. Otherwise they'd need to be knowledgeable about all the implementation details of our type system trickery.
- Specified by:
castForTestingin classMapMakerInternalMap.Segment<K,V, MapMakerInternalMap.StrongKeyStrongValueEntry<K, V>, MapMakerInternalMap.StrongKeyStrongValueSegment<K, V>>
-