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
`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
`MetaInterface` | `ICommand`
`MetaInterface` | `ICommandLog`
`MetaInterface` | `Interface`
`_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

    ### ICommand Type: `MetaInterface` Value:
        <class 'twisted.persisted.journal.base.ICommand'>

    ### ICommandLog Type: `MetaInterface` Value:
        <class 'twisted.persisted.journal.base.ICommandLog'>

    ### Interface Type: `MetaInterface` Value:
        <class 'twisted.python.components.Interface'>

    ### nested_scopes Type: `_Feature` Value:
        _Feature((2, 1, 0, 'beta', 1), (2, 2, 0, 'alpha', 0), 16)

Generated by Epydoc 1.1 on Thu May 8 13:16:34 2003 | http://epydoc.sf.net