summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/spi
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2008-01-20 23:53:15 +0000
committerBrian S. O'Neill <bronee@gmail.com>2008-01-20 23:53:15 +0000
commitc16deb46c161aa3916abbb1d9a66653d6d9ae3e9 (patch)
treec6c6579189cfe9a75d892e414dfa47334455c3a5 /src/main/java/com/amazon/carbonado/spi
parentee2c0e31f951aa86f2471ebcfb84272e167c0377 (diff)
Hide TransactionScope.close method.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/spi')
-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() {