t.p.j.base : module documentation

Part of twisted.persisted.journal View Source

Basic classes and interfaces for journal.
Class Journal All commands to the system get routed through here.
Class MemoryJournal Prevayler-like journal that dumps from memory to disk.
Interface ICommand A serializable command which interacts with a journaled service.
Interface ICommandLog Interface for command log.
Class LoadingService Base class for journalled service used with Wrappables.
Class Wrappable Base class for objects used with LoadingService.
Class WrapperCommand Undocumented
Function command Wrap a method so it gets turned into command automatically.
Class ServiceWrapperCommand Undocumented
Function serviceCommand Wrap methods into commands for a journalled service.
def command(methodName, cmdClass=WrapperCommand): (source)

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.
def serviceCommand(methodName, cmdClass=ServiceWrapperCommand): (source)

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.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:27:37.