From 095fdc14f030acf61bee801562b8bdafb7d54e33 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Fri, 25 Jan 2008 19:56:16 +0000 Subject: Add transaction detach/attach methods. --- .../amazon/carbonado/repo/logging/LoggingTransaction.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/main/java/com/amazon/carbonado/repo/logging') diff --git a/src/main/java/com/amazon/carbonado/repo/logging/LoggingTransaction.java b/src/main/java/com/amazon/carbonado/repo/logging/LoggingTransaction.java index fd88f35..dd2a4f5 100644 --- a/src/main/java/com/amazon/carbonado/repo/logging/LoggingTransaction.java +++ b/src/main/java/com/amazon/carbonado/repo/logging/LoggingTransaction.java @@ -83,6 +83,20 @@ class LoggingTransaction implements Transaction { return mTxn.getIsolationLevel(); } + public void detach() { + if (mLog.isEnabled()) { + mLog.write("Transaction.detach() on " + idChain()); + } + mTxn.detach(); + } + + public void attach() { + if (mLog.isEnabled()) { + mLog.write("Transaction.attach() on " + idChain()); + } + mTxn.attach(); + } + private String idChain() { if (mParent == null) { return String.valueOf(mID); -- cgit v1.2.3