[CalendarServer-changes] [5517] CalendarServer/branches/users/wsanchez/transations/txdav/idav.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu Apr 22 17:27:15 PDT 2010
Revision: 5517
http://trac.macosforge.org/projects/calendarserver/changeset/5517
Author: wsanchez at apple.com
Date: 2010-04-22 17:27:14 -0700 (Thu, 22 Apr 2010)
Log Message:
-----------
Add ITransaction
Modified Paths:
--------------
CalendarServer/branches/users/wsanchez/transations/txdav/idav.py
Modified: CalendarServer/branches/users/wsanchez/transations/txdav/idav.py
===================================================================
--- CalendarServer/branches/users/wsanchez/transations/txdav/idav.py 2010-04-23 00:26:53 UTC (rev 5516)
+++ CalendarServer/branches/users/wsanchez/transations/txdav/idav.py 2010-04-23 00:27:14 UTC (rev 5517)
@@ -84,3 +84,25 @@
"""
Abort any pending changes.
"""
+
+
+class ITransaction(Interface):
+ """
+ Transaction that can be aborted and either succeeds or fails in
+ its entirety.
+ """
+ def abort():
+ """
+ Abort this transaction.
+ """
+
+ def commit():
+ """
+ Perform this transaction.
+ """
+
+
+class AbortedTransactionError(RuntimeError):
+ """
+ This transaction has aborted. Go away.
+ """
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100422/6fde0f76/attachment.html>
More information about the calendarserver-changes
mailing list