Package twisted :: Package persisted :: Package journal :: Module base

[show private | hide private]
[frames | no frames]

## Module twisted.persisted.journal.base

Basic classes and interfaces for journal.

Classes
`ICommand` | A serializable command which interacts with a journaled service.
`ICommandLog` | Interface for command log.
`Journal` | All commands to the system get routed through here.
`LoadingService` | Base class for journalled service used with Wrappables.
`MemoryJournal` | Prevayler-like journal that dumps from memory to disk.
`ServiceWrapperCommand` |
`Wrappable` | Base class for objects used with LoadingService.
`WrapperCommand` |

Function Summary
| ``command`(methodName, cmdClass)` Wrap a method so it gets turned into command automatically.
| ``serviceCommand`(methodName, cmdClass)` Wrap methods into commands for a journalled service.

Variable Summary
`_Feature` | `nested_scopes`

Function Details

### command(methodName, cmdClass=<class twisted.persisted.journal.base.WrapperComm...)

Wrap a method so it gets turned into command automatically.

For use with Wrappables.

Usage:

       | class Foo(Wrappable):
       |     objectType = "foo"
       |     def getUid(self):
       |         return self.id
       |     def _bar(self, x):
       |         return x + 1
       |
       |     bar = command('_bar')

The resulting callable will have signature identical to wrapped function, except that it expects journal as first argument, and returns a Deferred.

### serviceCommand(methodName, cmdClass=<class twisted.persisted.journal.base.ServiceWrap...)

Wrap methods into commands for a journalled service.

The resulting callable will have signature identical to wrapped function, except that it expects journal as first argument, and returns a Deferred.

Variable Details

### nested_scopes

  Type:
    `_Feature`
  Value:

        Feature((2, 1, 0, 'beta', 1), (2, 2, 0, 'final', 0))

Generated by Epydoc 1.1 on Sat Feb 15 21:19:10 2003 | http://epydoc.sf.net