static final class MapMakerInternalMap.WeakKeyStrongValueSegment<K,V> extends MapMakerInternalMap.Segment<K,V,MapMakerInternalMap.WeakKeyStrongValueEntry<K,V>,MapMakerInternalMap.WeakKeyStrongValueSegment<K,V>>
MapMakerInternalMap.Segment for weak keys and strong values.| Modifier and Type | Field and Description |
|---|---|
private java.lang.ref.ReferenceQueue<K> |
queueForKeys |
count, map, maxSegmentSize, modCount, readCount, table, threshold| Constructor and Description |
|---|
WeakKeyStrongValueSegment(MapMakerInternalMap<K,V,MapMakerInternalMap.WeakKeyStrongValueEntry<K,V>,MapMakerInternalMap.WeakKeyStrongValueSegment<K,V>> map,
int initialCapacity,
int maxSegmentSize) |
| Modifier and Type | Method and Description |
|---|---|
MapMakerInternalMap.WeakKeyStrongValueEntry<K,V> |
castForTesting(MapMakerInternalMap.InternalEntry<K,V,?> 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.WeakKeyStrongValueSegment<K,V> |
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
WeakKeyStrongValueSegment(MapMakerInternalMap<K,V,MapMakerInternalMap.WeakKeyStrongValueEntry<K,V>,MapMakerInternalMap.WeakKeyStrongValueSegment<K,V>> map, int initialCapacity, int maxSegmentSize)
MapMakerInternalMap.WeakKeyStrongValueSegment<K,V> 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.
self in class MapMakerInternalMap.Segment<K,V,MapMakerInternalMap.WeakKeyStrongValueEntry<K,V>,MapMakerInternalMap.WeakKeyStrongValueSegment<K,V>>java.lang.ref.ReferenceQueue<K> getKeyReferenceQueueForTesting()
MapMakerInternalMap.Segmentpublic MapMakerInternalMap.WeakKeyStrongValueEntry<K,V> castForTesting(MapMakerInternalMap.InternalEntry<K,V,?> 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.
castForTesting in class MapMakerInternalMap.Segment<K,V,MapMakerInternalMap.WeakKeyStrongValueEntry<K,V>,MapMakerInternalMap.WeakKeyStrongValueSegment<K,V>>void maybeDrainReferenceQueues()
MapMakerInternalMap.Segmentvoid maybeClearReferenceQueues()
MapMakerInternalMap.Segment