Class s.i.Transactor(AccessBroker):

Part of sasync.items View In Hierarchy

Known subclasses: sasync.test.test_items.TestableItemsTransactor

I do the hands-on work of non-blocking database access for the persistence of name:value items within a uniquely-identified group, e.g., for a persistent dictionary using PersistentDict.

My methods return Twisted deferred instances to the results of their database accesses rather than forcing the client code to block while the database access is being completed.
Method __init__ Instantiates me for the items of a particular group uniquely identified
Method startup Startup method, automatically called before the first transaction.
Method load Item load transaction
Method loadAll Load all my items, returing a name:value dict
Method update Item overwrite (entry update) transaction
Method insert Item add (entry insert) transaction
Method delete Item(s) delete transaction
Method names All item names loading transaction

Inherited from AccessBroker:

Class Method engine Sets default connection parameters for all instances of me.
Method _getDeferredTracker Returns an instance of misc.DeferredTracker that is dedicated to the
Method _getQueue Returns a threaded task queue that is dedicated to my database
Method connect Generates and returns a singleton connection object.
Method _sessionClose Replacement close method for session objects.
Method getSession Get a commitable session object
Method table Instantiates a new table object, creating it in the transaction thread
Method userStartup If this method is defined and startup is not overridden in your
Method first This method automatically runs as the first transaction after
Method shutdown Shuts down my database transaction functionality and threaded task
Method s Polymorphic method for working with select instances within a cached
Method queryToList Executes my current select object with the bind parameters supplied as
Method deferToQueue Dispatches callable(*args, **kw) as a task via the like-named method
def __init__(self, ID, *url, **kw):
Instantiates me for the items of a particular group uniquely identified by the supplied integer ID, optionally using a particular database connection to url with any supplied keywords.
def startup(self):
Startup method, automatically called before the first transaction.
def load(self, name):
Item load transaction
def loadAll(self):
Load all my items, returing a name:value dict
def update(self, name, value):
Item overwrite (entry update) transaction
def insert(self, name, value):
Item add (entry insert) transaction
def delete(self, *names):
Item(s) delete transaction
def names(self):
All item names loading transaction
API Documentation for sAsync, generated by pydoctor.