Class BlockIndexSequence

java.lang.Object
org.rostore.v2.seq.BlockIndexSequence
All Implemented Interfaces:
AutoCloseable

public class BlockIndexSequence extends Object implements AutoCloseable
This is the list of blocks which is used in the sequences

Every block starts with nextBlock reference.

  • Constructor Details

    • BlockIndexSequence

      public BlockIndexSequence()
  • Method Details

    • removeAtEnd

      public void removeAtEnd(int howMany)
    • createCatalogBlockIndices

      public CatalogBlockIndices createCatalogBlockIndices()
    • markSequenceUsed

      public void markSequenceUsed()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • isSequenceInUse

      public boolean isSequenceInUse()
    • getBlockIndex

      public long getBlockIndex(int seqIndex)
    • length

      public int length()
    • getFreeBlockNumber

      public int getFreeBlockNumber()
    • add

      public void add(int seqIndex, long blockIndex)
    • remove

      public void remove(int seqIndex)
    • getLastUsageTimestampMillis

      public long getLastUsageTimestampMillis()
    • getFirstFreeIndex

      public int getFirstFreeIndex()
    • setFirstFreeIndex

      public void setFirstFreeIndex(int firstFreeIndex)