Package twisted :: Package persisted :: Package journal :: Module base :: Class Journal

[show private | hide private]
[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)`
| ``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

### 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 1.1 on Sat Feb 15 21:17:56 2003 | http://epydoc.sf.net