summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/amazon/carbonado/spi/TransactionScope.java46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/main/java/com/amazon/carbonado/spi/TransactionScope.java b/src/main/java/com/amazon/carbonado/spi/TransactionScope.java
index fae5e88..604cf2d 100644
--- a/src/main/java/com/amazon/carbonado/spi/TransactionScope.java
+++ b/src/main/java/com/amazon/carbonado/spi/TransactionScope.java
@@ -169,29 +169,6 @@ public class TransactionScope<Txn> {
}
/**
- * Exits all transactions and closes all cursors. Should be called only
- * when repository is closed.
- */
- public void close() throws RepositoryException {
- mLock.lock();
- try {
- if (!mClosed) {
- while (mActive != null) {
- mActive.exit();
- }
- if (mCursors != null) {
- for (CursorList<TransactionImpl<Txn>> cursorList : mCursors.values()) {
- cursorList.closeCursors();
- }
- }
- }
- } finally {
- mClosed = true;
- mLock.unlock();
- }
- }
-
- /**
* Returns the implementation for the active transaction, or null if there
* is no active transaction.
*
@@ -233,6 +210,29 @@ public class TransactionScope<Txn> {
}
/**
+ * Exits all transactions and closes all cursors. Should be called only
+ * when repository is closed.
+ */
+ void close() throws RepositoryException {
+ mLock.lock();
+ try {
+ if (!mClosed) {
+ while (mActive != null) {
+ mActive.exit();
+ }
+ if (mCursors != null) {
+ for (CursorList<TransactionImpl<Txn>> cursorList : mCursors.values()) {
+ cursorList.closeCursors();
+ }
+ }
+ }
+ } finally {
+ mClosed = true;
+ mLock.unlock();
+ }
+ }
+
+ /**
* Caller must hold mLock.
*/
private void checkState() {