java.lang.Object
net.i2p.data.SDSCache.IntWeakCache.Table
Enclosing class:
SDSCache.IntWeakCache<V>

private static final class SDSCache.IntWeakCache.Tableextends Object
Replaced wholesale (never resized in place) so a reader always sees a complete table.
  • Field Details

    • mask

      private final int mask
      Mask selecting the slot from a key.
    • keys

      private final int[] keys
      The keys held in the table.
    • refs

      private final AtomicReferenceArray<WeakReference<?>> 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