Package org.rostore.v2.seq
Class BlockIndexSequence
java.lang.Object
org.rostore.v2.seq.BlockIndexSequence
- All Implemented Interfaces:
AutoCloseable
This is the list of blocks which is used in the sequences
Every block starts with nextBlock reference.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int seqIndex, long blockIndex) voidclose()longgetBlockIndex(int seqIndex) intintlongbooleanintlength()voidvoidremove(int seqIndex) voidremoveAtEnd(int howMany) voidsetFirstFreeIndex(int firstFreeIndex)
-
Constructor Details
-
BlockIndexSequence
public BlockIndexSequence()
-
-
Method Details
-
removeAtEnd
public void removeAtEnd(int howMany) -
createCatalogBlockIndices
-
markSequenceUsed
public void markSequenceUsed() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
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)
-