Package com.google.common.collect
Class MapMakerInternalMap.WeakKeyDummyValueSegment<K>
java.lang.Object
java.util.concurrent.locks.ReentrantLock
com.google.common.collect.MapMakerInternalMap.Segment<K,MapMaker.Dummy,MapMakerInternalMap.WeakKeyDummyValueEntry<K>,MapMakerInternalMap.WeakKeyDummyValueSegment<K>>
com.google.common.collect.MapMakerInternalMap.WeakKeyDummyValueSegment<K>
- 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.WeakKeyDummyValueSegment<K>
extends MapMakerInternalMap.Segment<K,MapMaker.Dummy,MapMakerInternalMap.WeakKeyDummyValueEntry<K>,MapMakerInternalMap.WeakKeyDummyValueSegment<K>>
Concrete implementation of
MapMakerInternalMap.Segment for weak keys and MapMaker.Dummy values.-
Field Summary
FieldsFields inherited from class com.google.common.collect.MapMakerInternalMap.Segment
count, map, maxSegmentSize, modCount, readCount, table, threshold -
Constructor Summary
ConstructorsConstructorDescriptionWeakKeyDummyValueSegment(MapMakerInternalMap<K, MapMaker.Dummy, MapMakerInternalMap.WeakKeyDummyValueEntry<K>, MapMakerInternalMap.WeakKeyDummyValueSegment<K>> map, int initialCapacity, int maxSegmentSize) -
Method Summary
Modifier and TypeMethodDescriptionUnsafe cast of the given entry toE, the type of the specificMapMakerInternalMap.InternalEntryimplementation type.(package private) ReferenceQueue<K>Unsafely extracts the key reference queue used by this segment.(package private) voidClears the reference queues used by this segment, if any.(package private) voidDrains the reference queues used by this segment, if any.(package private) MapMakerInternalMap.WeakKeyDummyValueSegment<K>self()Methods inherited from class com.google.common.collect.MapMakerInternalMap.Segment
clear, clearReferenceQueue, clearValueForTesting, containsKey, containsValue, copyEntry, copyForTesting, drainKeyReferenceQueue, drainValueReferenceQueue, expand, get, getEntry, getFirst, getLiveEntry, getLiveValue, getLiveValueForTesting, getValueReferenceQueueForTesting, getWeakValueReferenceForTesting, initTable, isCollected, 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
-
Field Details
-
queueForKeys
-
-
Constructor Details
-
WeakKeyDummyValueSegment
WeakKeyDummyValueSegment(MapMakerInternalMap<K, MapMaker.Dummy, MapMakerInternalMap.WeakKeyDummyValueEntry<K>, MapMakerInternalMap.WeakKeyDummyValueSegment<K>> map, int initialCapacity, int maxSegmentSize)
-
-
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. -
getKeyReferenceQueueForTesting
ReferenceQueue<K> getKeyReferenceQueueForTesting()Description copied from class:MapMakerInternalMap.SegmentUnsafely extracts the key reference queue used by this segment. -
castForTesting
public MapMakerInternalMap.WeakKeyDummyValueEntry<K> castForTesting(MapMakerInternalMap.InternalEntry<K, MapMaker.Dummy, ?> 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 knowledgable about all the implementation details of our type system trickery.
-
maybeDrainReferenceQueues
void maybeDrainReferenceQueues()Description copied from class:MapMakerInternalMap.SegmentDrains the reference queues used by this segment, if any. -
maybeClearReferenceQueues
void maybeClearReferenceQueues()Description copied from class:MapMakerInternalMap.SegmentClears the reference queues used by this segment, if any.
-