Package com.mckoi.database
Class IndexStore.IndexIntegerList
- java.lang.Object
-
- com.mckoi.util.AbstractBlockIntegerList
-
- com.mckoi.database.IndexStore.IndexIntegerList
-
- All Implemented Interfaces:
IntegerListInterface
- Enclosing class:
- IndexStore
private final class IndexStore.IndexIntegerList extends AbstractBlockIntegerList
The IntegerListInterface implementation that is used to represent a mutable snapshop of the indices at a given point in time.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList
deleted_blocks
The mapped elements that were deleted.private boolean
disposed
Set to true when disposed.private int
index_num
The number of the index in the store that this list represents.-
Fields inherited from class com.mckoi.util.AbstractBlockIntegerList
block_list
-
-
Constructor Summary
Constructors Constructor Description IndexIntegerList(int index_num, IndexStore.MappedListBlock[] blocks)
Constructs the list with the given set of blocks.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
deleteListBlock(IntegerListBlockInterface list_block)
We must maintain a list of deleted blocks.void
dispose()
IndexStore.MappedListBlock[]
getAllBlocks()
Returns the array of all MappedListBlock that are in this list.IndexStore.MappedListBlock[]
getDeletedBlocks()
Returns the array of all MappedListBlock that were deleted from this list.int
getIndexNumber()
Returns the index number of this list.protected IntegerListBlockInterface
newListBlock()
Creates a new block for the list.-
Methods inherited from class com.mckoi.util.AbstractBlockIntegerList
add, add, checkSorted, checkSorted, contains, contains, get, insertSort, insertSort, isImmutable, iterator, iterator, remove, removeFromBlock, removeSort, removeSort, searchFirst, searchLast, setImmutable, size, toString, uniqueInsertSort
-
-
-
-
Constructor Detail
-
IndexIntegerList
public IndexIntegerList(int index_num, IndexStore.MappedListBlock[] blocks)
Constructs the list with the given set of blocks.
-
-
Method Detail
-
newListBlock
protected IntegerListBlockInterface newListBlock()
Creates a new block for the list.- Specified by:
newListBlock
in classAbstractBlockIntegerList
-
deleteListBlock
protected void deleteListBlock(IntegerListBlockInterface list_block)
We must maintain a list of deleted blocks.- Overrides:
deleteListBlock
in classAbstractBlockIntegerList
-
getIndexNumber
public int getIndexNumber()
Returns the index number of this list.
-
getAllBlocks
public IndexStore.MappedListBlock[] getAllBlocks()
Returns the array of all MappedListBlock that are in this list.
-
getDeletedBlocks
public IndexStore.MappedListBlock[] getDeletedBlocks()
Returns the array of all MappedListBlock that were deleted from this list.
-
dispose
public void dispose()
-
-