Package twisted :: Package persisted :: Package journal :: Module base :: Class Journal
[frames | no frames]

Class Journal

Known Subclasses:
MemoryJournal, RowJournal

All commands to the system get routed through here.

Subclasses should implement the actual snapshotting capability.
Method Summary
  __init__(self, log, journaledService)
  _reallyExecute(self, index, command, runTime)
Callback called when logging command is done.
  executeCommand(self, command)
Log and execute a command.
  getLastSnapshot(self)
Return command index of the last snapshot taken.
  sync(self, *args, **kwargs)
Save journal to disk, returns Deferred of finish status.
  updateFromLog(self)
Run all commands from log that haven't been run yet.

Method Details

_reallyExecute(self, index, command, runTime)

Callback called when logging command is done.

executeCommand(self, command)

Log and execute a command.

getLastSnapshot(self)

Return command index of the last snapshot taken.

sync(self, *args, **kwargs)

Save journal to disk, returns Deferred of finish status.

Subclasses may choose whatever signature is appropriate, or may not implement this at all.

updateFromLog(self)

Run all commands from log that haven't been run yet.

This method should be run on startup to ensure the snapshot is up-to-date.

Generated by Epydoc 2.0 on Sat May 15 20:07:59 2004 http://epydoc.sf.net