public abstract class StateMgrBase extends Object implements org.apache.jena.atlas.lib.Sync, org.apache.jena.atlas.lib.Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
BufferChannel |
getBufferChannel()
Low level control - for example, used for cloning setup.
|
ByteBuffer |
getState()
Return the serialized state using the internal ByteBuffer
Typically called by "prepare" for the bytes to write to the journal.
|
void |
readState()
The read process : get all bytes on disk, deserialize
|
void |
setState(ByteBuffer buff)
Set the in-memory state from a ByteBuffer, for example, from journal recovery.
|
void |
sync() |
void |
writeState()
The write process : serialize, write, sync,
After this, the bytes definitely are on disk, not in some OS cache
|
public BufferChannel getBufferChannel()
public ByteBuffer getState()
serialize(java.nio.ByteBuffer).
This method does not perform an external I/O.public void setState(ByteBuffer buff)
public void writeState()
public void readState()
public void sync()
sync in interface org.apache.jena.atlas.lib.Syncpublic void close()
close in interface org.apache.jena.atlas.lib.CloseableLicensed under the Apache License, Version 2.0