Class Striped.LargeLazyStriped<L>

Enclosing class:
Striped<L>

static class Striped.LargeLazyStriped<L> extends Striped.PowerOfTwoStriped<L>
Implementation of Striped where up to 2^k stripes can be represented, using a ConcurrentMap where the key domain is [0..2^k). To map a user key into a stripe, we take a k-bit slice of the user key's (smeared) hashCode(). The stripes are lazily initialized and are weakly referenced.
  • Field Details

  • Constructor Details

    • LargeLazyStriped

      LargeLazyStriped(int stripes, Supplier<L> supplier)
  • Method Details

    • getAt

      public L getAt(int index)
      Description copied from class: Striped
      Returns the stripe at the specified index. Valid indexes are 0, inclusively, to size(), exclusively.
      Specified by:
      getAt in class Striped<L>
      Parameters:
      index - the index of the stripe to return; must be in [0...size())
      Returns:
      the stripe at the specified index
    • size

      public int size()
      Description copied from class: Striped
      Returns the total number of stripes in this instance.
      Specified by:
      size in class Striped<L>