Commit 7ed570c9 authored by Jim Fulton's avatar Jim Fulton

Various clarifications and corrections.

parent e4c8cfe4
...@@ -480,9 +480,6 @@ class IStorage(Interface): ...@@ -480,9 +480,6 @@ class IStorage(Interface):
If the transaction had extension items, then these items are If the transaction had extension items, then these items are
also included if they don't conflict with the keys above. also included if they don't conflict with the keys above.
The version argument is provided for backward
compatibility. It should always be an empty string.
""" """
...@@ -534,6 +531,8 @@ class IStorage(Interface): ...@@ -534,6 +531,8 @@ class IStorage(Interface):
- The transaction id of the data record - The transaction id of the data record
- The transaction id of the following revision, if any, or None. - The transaction id of the following revision, if any, or None.
If the object id isn't in the storage, then POSKeyError is raised.
""" """
def loadSerial(oid, serial): def loadSerial(oid, serial):
...@@ -543,6 +542,19 @@ class IStorage(Interface): ...@@ -543,6 +542,19 @@ class IStorage(Interface):
otherwise, POSKeyError is raised. otherwise, POSKeyError is raised.
""" """
# The following two methods are effectively part of the interface,
# as they are generally needed when one storage wraps
# another. This deserves some thought, at probably debate, before
# adding them.
#
# def _lock_acquire():
# """Acquire the storage lock
# """
# def _lock_release():
# """Release the storage lock
# """
def new_oid(): def new_oid():
"""Allocate a new object id. """Allocate a new object id.
...@@ -676,7 +688,7 @@ class IStorage(Interface): ...@@ -676,7 +688,7 @@ class IStorage(Interface):
current transaction ends (commits or aborts). current transaction ends (commits or aborts).
""" """
def tpc_finish(transaction, func = lambda: None): def tpc_finish(transaction, func = lambda tid: None):
"""Finish the transaction, making any transaction changes permanent. """Finish the transaction, making any transaction changes permanent.
Changes must be made permanent at this point. Changes must be made permanent at this point.
...@@ -684,6 +696,11 @@ class IStorage(Interface): ...@@ -684,6 +696,11 @@ class IStorage(Interface):
This call is ignored if the storage isn't participating in This call is ignored if the storage isn't participating in
two-phase commit or if it is commiting a different two-phase commit or if it is commiting a different
transaction. Failure of this method is extremely serious. transaction. Failure of this method is extremely serious.
The second argument is a call-back function that must be
called while the storage transaction lock is held. It takes
the new transaction id generated by the transaction.
""" """
def tpc_vote(transaction): def tpc_vote(transaction):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment