Package org.apache.jena.dboe.base.page
Class PageBlockMgr<T extends Page>
- java.lang.Object
-
- org.apache.jena.dboe.base.page.PageBlockMgr<T>
-
- All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable
- Direct Known Subclasses:
RecordBufferPageMgr
public class PageBlockMgr<T extends Page> extends java.lang.Object implements org.apache.jena.atlas.lib.CloseableEngine that wraps from blocks to typed pages.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longallocLimit()voidclose()Tcreate(BlockType bType)Allocate a new thingvoiddump()voidfinishRead()Signal the completion of an read operationvoidfinishUpdate()Signal the completion of an update operationvoidfree(Page page)BlockMgrgetBlockMgr()TgetRead(int id)Fetch a block for reading.TgetRead(int id, int referencingId)Fetch a block for reading.TgetWrite(int id)Fetch a block for writing.TgetWrite(int id, int referencingId)Fetch a block for writing.booleanpromoteDuplicate(Page page)Promote a page - return 'true' if the block changed (.reset()) will have been calledvoidpromoteInPlace(Page page)Promote a page to be writable in-place (block id does not change, hence page does not change id).voidput(T page)voidrelease(Page page)voidresetAlloc(long boundary)voidstartRead()Signal the start of an read operationvoidstartUpdate()Signal the start of an update operationbooleanvalid(int id)voidwrite(T page)
-
-
-
Method Detail
-
getBlockMgr
public BlockMgr getBlockMgr()
-
allocLimit
public long allocLimit()
-
resetAlloc
public void resetAlloc(long boundary)
-
getRead
public T getRead(int id)
Fetch a block for reading.- Parameters:
id- Block to fetch
-
getRead
public T getRead(int id, int referencingId)
Fetch a block for reading.- Parameters:
id- Block to fetchreferencingId- Id of block referring to this one. For example, a parent in a tree. May be negative for "none" or "meaningless".
-
getWrite
public T getWrite(int id)
Fetch a block for writing.- Parameters:
id- Block to fetch
-
getWrite
public T getWrite(int id, int referencingId)
Fetch a block for writing.- Parameters:
id- Block to fetchreferencingId- Id of block referring to this one. For example, a parent in a tree. May be -1 for "none" or "meaningless".
-
put
public void put(T page)
-
write
public void write(T page)
-
release
public void release(Page page)
-
free
public void free(Page page)
-
promoteInPlace
public void promoteInPlace(Page page)
Promote a page to be writable in-place (block id does not change, hence page does not change id).
-
promoteDuplicate
public boolean promoteDuplicate(Page page)
Promote a page - return 'true' if the block changed (.reset()) will have been called
-
valid
public boolean valid(int id)
-
dump
public void dump()
-
startUpdate
public void startUpdate()
Signal the start of an update operation
-
finishUpdate
public void finishUpdate()
Signal the completion of an update operation
-
startRead
public void startRead()
Signal the start of an read operation
-
finishRead
public void finishRead()
Signal the completion of an read operation
-
close
public void close()
- Specified by:
closein interfaceorg.apache.jena.atlas.lib.Closeable
-
-