Class ByteBigList.ByteBlock

All Implemented Interfaces:
Serializable, Cloneable, IByteListable
Enclosing class:
ByteBigList

static class ByteBigList.ByteBlock extends ByteGapList
A block stores in maximum blockSize number of elements. The first block in a ByteBigList will grow until reaches this limit, all other blocks are directly allocated with a capacity of blockSize. A block maintains a reference count which allows a block to be shared among different ByteBigList instances with a copy-on-write approach.
  • Field Details

  • Constructor Details

    • ByteBlock

      public ByteBlock()
    • ByteBlock

      public ByteBlock(int capacity)
    • ByteBlock

      public ByteBlock(ByteBigList.ByteBlock that)
  • Method Details

    • isShared

      public boolean isShared()
      Returns:
      true if block is shared by several ByteBigList instances
    • ref

      public ByteBigList.ByteBlock ref()
      Increment reference count as block is used by one ByteBigList instance more.
    • unref

      public void unref()
      Decrement reference count as block is no longer used by one ByteBigList instance.