|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Logger
An interface defining how a Logger Object should work. A Logger is responsible for logging the commands to disk, taking snapshots of the Space to disk, recovering snapshots of the Space from disk, and reapplying the logged Commands.
| Method Summary | |
|---|---|
long |
getLogNumber()
Get the current log number. |
void |
logCommand(Command cmd)
Log a command to a log file on disk. |
Space |
readSnapshot()
Recover the last snapshot from disk and recreate a Space from it. |
void |
reapplyCommandsFromLog(Space4J space4j)
Read the last commands from the log and re-apply them to this Space4J. |
void |
takeSnapshot(Space space)
Take a snapshot of the Space to disk. |
void |
takeSnapshot(Space space,
long snapnumber)
Take a snapshot of the Space to disk. |
| Method Detail |
|---|
void logCommand(Command cmd)
throws LoggerException
cmd - The command to log
LoggerException
void takeSnapshot(Space space)
throws LoggerException
space - The space to be saved.
LoggerException
void takeSnapshot(Space space,
long snapnumber)
throws LoggerException
space - The space to be saved.snapnumber - The number of the snapshot to be saved.
LoggerException
Space readSnapshot()
throws LoggerException
LoggerException
void reapplyCommandsFromLog(Space4J space4j)
throws LoggerException,
CommandException
space4j - The Space4J that will redo the commands.
LoggerException
CommandExceptionlong getLogNumber()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||