static final class MapMakerInternalMap.WeakKeyDummyValueSegment<K> extends MapMakerInternalMap.Segment<K,MapMaker.Dummy,MapMakerInternalMap.WeakKeyDummyValueEntry<K>,MapMakerInternalMap.WeakKeyDummyValueSegment<K>>
MapMakerInternalMap.Segment for weak keys and MapMaker.Dummy values.| Modifier and Type | Field and Description |
|---|---|
private java.lang.ref.ReferenceQueue<K> |
queueForKeys |
count, map, maxSegmentSize, modCount, readCount, table, threshold| Constructor and Description |
|---|
WeakKeyDummyValueSegment(MapMakerInternalMap<K,MapMaker.Dummy,MapMakerInternalMap.WeakKeyDummyValueEntry<K>,MapMakerInternalMap.WeakKeyDummyValueSegment<K>> map,
int initialCapacity,
int maxSegmentSize) |
| Modifier and Type | Method and Description |
|---|---|
MapMakerInternalMap.WeakKeyDummyValueEntry<K> |
castForTesting(MapMakerInternalMap.InternalEntry<K,MapMaker.Dummy,?> entry)
Unsafe cast of the given entry to
E, the type of the specific MapMakerInternalMap.InternalEntry
implementation type. |
(package private) java.lang.ref.ReferenceQueue<K> |
getKeyReferenceQueueForTesting()
Unsafely extracts the key reference queue used by this segment.
|
(package private) void |
maybeClearReferenceQueues()
Clears the reference queues used by this segment, if any.
|
(package private) void |
maybeDrainReferenceQueues()
Drains the reference queues used by this segment, if any.
|
(package private) MapMakerInternalMap.WeakKeyDummyValueSegment<K> |
self()
|
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, tryDrainReferenceQueuesgetHoldCount, getOwner, getQueuedThreads, getQueueLength, getWaitingThreads, getWaitQueueLength, hasQueuedThread, hasQueuedThreads, hasWaiters, isFair, isHeldByCurrentThread, isLocked, lock, lockInterruptibly, newCondition, toString, tryLock, tryLock, unlockprivate final java.lang.ref.ReferenceQueue<K> queueForKeys
WeakKeyDummyValueSegment(MapMakerInternalMap<K,MapMaker.Dummy,MapMakerInternalMap.WeakKeyDummyValueEntry<K>,MapMakerInternalMap.WeakKeyDummyValueSegment<K>> map, int initialCapacity, int maxSegmentSize)
MapMakerInternalMap.WeakKeyDummyValueSegment<K> self()
MapMakerInternalMap.Segmentthis up-casted to the specific MapMakerInternalMap.Segment implementation type S.
This method exists so that the MapMakerInternalMap.Segment code can be generic in terms of S,
the type of the concrete implementation.
java.lang.ref.ReferenceQueue<K> getKeyReferenceQueueForTesting()
MapMakerInternalMap.Segmentpublic MapMakerInternalMap.WeakKeyDummyValueEntry<K> castForTesting(MapMakerInternalMap.InternalEntry<K,MapMaker.Dummy,?> entry)
MapMakerInternalMap.SegmentE, the type of the specific MapMakerInternalMap.InternalEntry
implementation 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.
void maybeDrainReferenceQueues()
MapMakerInternalMap.Segmentvoid maybeClearReferenceQueues()
MapMakerInternalMap.Segment