summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/repo
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2008-01-25 19:56:16 +0000
committerBrian S. O'Neill <bronee@gmail.com>2008-01-25 19:56:16 +0000
commit095fdc14f030acf61bee801562b8bdafb7d54e33 (patch)
treeac96856309fe6bc891114f09401dfe54cc49ae12 /src/main/java/com/amazon/carbonado/repo
parent81137fdb2509b83de8b509e6a4417b37ba3a6d63 (diff)
Add transaction detach/attach methods.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/logging/LoggingTransaction.java14
1 files changed, 14 insertions, 0 deletions
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);