|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LogStream
The LogStream interface is an abstract definition of a stream that encapsulates a physical log. In contrast to a regular input or output stream, a log stream has both input and output facilities to the same underlying log. It also allows for checkpointing, but the client is responsible for determining the checkpoint contents. Checkpointing allows the log stream to decrease in size.
Method Summary | |
---|---|
void |
close()
For proper termination: a close method. |
void |
flushObject(Object objectToFlush,
boolean shouldSync)
Flush (force) an object to the stream. |
long |
getSize()
Get the size of the stream. |
Vector |
recover()
Reads the log contents, and initializes the data structure. |
void |
writeCheckpoint(Enumeration elements)
After intial recovery, it is good practice to write a checkpoint with only the most recent data. |
Method Detail |
---|
long getSize() throws LogException
LogException
- On error.Vector recover() throws LogException
LogException
- On failure.void writeCheckpoint(Enumeration elements) throws LogException
elements
- The elements to keep in the log.
LogException
- On failure.void flushObject(Object objectToFlush, boolean shouldSync) throws LogException
LogException
- On failure.void close() throws LogException
LogException
- On failure.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |