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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int seqIndex, long blockIndex) void
close()
long
getBlockIndex
(int seqIndex) int
int
long
boolean
int
length()
void
void
remove
(int seqIndex) void
removeAtEnd
(int howMany) void
setFirstFreeIndex
(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:
close
in 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)
-