Objects wishing to be persistent should usually derive from this class: it implements the dopy_afterMethod() method to write the object after every method invocation.
Alternatively, users may wish to implement this functionality themselves so as to be more selective about when they write the object. If you choose to implement this yourself, you may also wish to implement the _dopy_setpath() method to allow the pathname of the object to be communicated upon activation.
def __init__(self):
def _acquire(self):
Manages the cache. Derived classes should call this if they override
dopy_beforeMethod().
Manages the cache. Derived classes should call this if they override
dopy_afterMethod().
Called by
dopy.Hub.__processRequest() after a remote method invocation. Writes
self to its file.
Called by
dopy.Hub.__processRequest() before a remote method invocation. Increments
the use count associated with self in the cache.
Called by FileSysDirectory upon loading
the object. Sets the path so that the object can be saved to the correct file
by dopy_afterMethod().
_release(self)
def _release(self):
dopy_afterMethod(self, request, response)
def dopy_afterMethod(self, request, response):
dopy_beforeMethod(self, request)
def dopy_beforeMethod(self, request):
dopy_setPath(self, pathname)
def dopy_setPath(self, pathname):