Class BlockLocks

  • public class BlockLocks
    extends Object
    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Constructor Detail

      • BlockLocks

        public BlockLocks​(long numBits)
    • Method Detail

      • nextClearBit

        public int nextClearBit​(int index)
        Find the next clear bit in the bit set.
        index - index
        next next bit
      • set

        public boolean set​(int index)
        Thread safe set operation that will set the bit if and only if the bit was not previously set.
        index - the index position to set.
        returns true if the bit was set and false if it was already set.
      • clear

        public void clear​(int index)