java.lang.Object
net.i2p.data.SDSCache.IntWeakCache.Table
- Enclosing class:
SDSCache.IntWeakCache<V>
Replaced wholesale (never resized in place) so a reader always sees a complete table.
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int[]The keys held in the table.private final intMask selecting the slot from a key.private final AtomicReferenceArray<WeakReference<?>> The cached objects, weakly held.Constructor Summary
ConstructorsMethod Summary
Field Details
mask
private final int maskMask selecting the slot from a key.keys
private final int[] keysThe keys held in the table.refs
The cached objects, weakly held.
Constructor Details
Table
Table(int capacity) Builds an empty table of the capacity.- Parameters:
capacity- the number of slots, a power of two