| Modifier and Type | Class and Description |
|---|---|
| protected class | BlockStore.
Used to detect if a chain has a loop in it, so we can bail out with an error rather than spinning away for ever... |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract ByteBuffer | createBlockIfNeeded(final int offset)
Extends the file if required to hold blocks up to the specified offset, and return the block from there. |
| protected abstract BATBlock. | getBATBlockAndIndex(final int offset)
Returns the BATBlock that handles the specified offset, and the relative index within it |
| protected abstract ByteBuffer | |
| protected abstract int | |
| protected abstract BlockStore. | |
| protected abstract int | |
| protected abstract int | |
| protected abstract void | releaseBuffer(ByteBuffer
the buffer buffer)Releases a mmap-ed buffer, which you are sure won't be used again |
| protected abstract void | setNextBlock(final int offset, final int nextBlock)
Changes the record of what block follows the specified one. |
| BlockStore | back to summary |
|---|---|
| public BlockStore() | |
| createBlockIfNeeded | back to summary |
|---|---|
| protected abstract ByteBuffer createBlockIfNeeded(final int offset) throws IOException Extends the file if required to hold blocks up to the specified offset, and return the block from there. | |
| getBATBlockAndIndex | back to summary |
|---|---|
| protected abstract BATBlock. Returns the BATBlock that handles the specified offset, and the relative index within it | |
| getBlockAt | back to summary |
|---|---|
| protected abstract ByteBuffer getBlockAt(final int offset) throws IOException Load the block at the given offset. | |
| getBlockStoreBlockSize | back to summary |
|---|---|
| protected abstract int getBlockStoreBlockSize() Returns the size of the blocks managed through the block store. | |
| getChainLoopDetector | back to summary |
|---|---|
| protected abstract BlockStore. Creates a Detector for loops in the chain | |
| getFreeBlock | back to summary |
|---|---|
| protected abstract int getFreeBlock() throws IOException Finds a free block, and returns its offset. This method will extend the file/stream if needed, and if doing so, allocate new FAT blocks to address the extra space. | |
| getNextBlock | back to summary |
|---|---|
| protected abstract int getNextBlock(final int offset) Works out what block follows the specified one. | |
| releaseBuffer | back to summary |
|---|---|
| protected abstract void releaseBuffer(ByteBuffer buffer) Releases a mmap-ed buffer, which you are sure won't be used again
| |
| setNextBlock | back to summary |
|---|---|
| protected abstract void setNextBlock(final int offset, final int nextBlock) Changes the record of what block follows the specified one. | |
| Modifier and Type | Field and Description |
|---|---|
| private final boolean[] |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected void |
| used_blocks | back to summary |
|---|---|
| private final boolean[] used_blocks | |
| ChainLoopDetector | back to summary |
|---|---|
| protected ChainLoopDetector(long rawSize) | |
| claim | back to summary |
|---|---|
| protected void claim(int offset) | |