public interface BlockMgr extends org.apache.jena.atlas.lib.Sync, org.apache.jena.atlas.lib.Closeable
| Modifier and Type | Method and Description |
|---|---|
Block |
allocate(int blockSize)
Allocate an uninitialized block - writable - call only inside a update sequence.
|
long |
allocLimit()
The fixed allocated blocks are in the range [0,allocLimit).
|
void |
beginRead()
Start of read
|
void |
beginUpdate()
Start of update
|
void |
close()
Close the block manager
|
void |
endRead()
Completion of read
|
void |
endUpdate()
Completion of update
|
void |
free(Block block)
Announce a block is no longer in use (i.e it's now freed)
|
String |
getLabel() |
Block |
getRead(long id)
Fetch a block, use for read only
|
Block |
getWrite(long id)
Fetch a block, use for write and read - only inside "update"
|
boolean |
isClosed()
Is this block manager still usable? Closed block managers can not perform any operations except this one.
|
boolean |
isEmpty()
Answer whether there are any blocks in the collection being managed
|
void |
overwrite(Block blk)
Replace the contents of a block slot with new contents.
|
Block |
promote(Block block)
Promote to writable : it's OK to promote an already writable block
|
void |
release(Block block)
Release a block, unmodified or already written.
|
void |
resetAlloc(long boundary)
Reset the allocation limit, should be a number previously obtained from allocLimit
|
void |
sync()
Sync the block manager
|
void |
syncForce()
Sync the block manager : system operation to ensure sync() is passed down
|
boolean |
valid(int id)
Is this a valid block id? (may be a free block)
|
void |
write(Block block)
Write a block back - it still needs releasing.
|
Block allocate(int blockSize)
boolean isEmpty()
long allocLimit()
void resetAlloc(long boundary)
Block getRead(long id)
Block getWrite(long id)
void release(Block block)
Block promote(Block block)
void write(Block block)
void overwrite(Block blk)
void free(Block block)
boolean valid(int id)
void close()
close in interface org.apache.jena.atlas.lib.Closeableboolean isClosed()
void sync()
sync in interface org.apache.jena.atlas.lib.Syncvoid syncForce()
void beginUpdate()
void endUpdate()
void beginRead()
void endRead()
String getLabel()
Licensed under the Apache License, Version 2.0