diff options
Diffstat (limited to 'src/main/java/com/amazon/carbonado')
16 files changed, 49 insertions, 17 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java index 643cd85..03383c6 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCRepository.java @@ -56,8 +56,8 @@ import com.amazon.carbonado.info.StorableProperty; import com.amazon.carbonado.sequence.SequenceCapability;
import com.amazon.carbonado.sequence.SequenceValueProducer;
import com.amazon.carbonado.spi.AbstractRepository;
-import com.amazon.carbonado.spi.TransactionManager;
-import com.amazon.carbonado.spi.TransactionScope;
+import com.amazon.carbonado.txn.TransactionManager;
+import com.amazon.carbonado.txn.TransactionScope;
import com.amazon.carbonado.util.ThrowUnchecked;
/**
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCTransactionManager.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCTransactionManager.java index c499a6b..55e6150 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCTransactionManager.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCTransactionManager.java @@ -26,7 +26,7 @@ import com.amazon.carbonado.FetchException; import com.amazon.carbonado.IsolationLevel;
import com.amazon.carbonado.PersistException;
import com.amazon.carbonado.Transaction;
-import com.amazon.carbonado.spi.TransactionManager;
+import com.amazon.carbonado.txn.TransactionManager;
/**
* Manages transactions for JDBCRepository.
diff --git a/src/main/java/com/amazon/carbonado/repo/map/MapCursor.java b/src/main/java/com/amazon/carbonado/repo/map/MapCursor.java index 006fd46..b9b0ab5 100644 --- a/src/main/java/com/amazon/carbonado/repo/map/MapCursor.java +++ b/src/main/java/com/amazon/carbonado/repo/map/MapCursor.java @@ -29,7 +29,7 @@ import com.amazon.carbonado.Storable; import com.amazon.carbonado.cursor.AbstractCursor;
-import com.amazon.carbonado.spi.TransactionScope;
+import com.amazon.carbonado.txn.TransactionScope;
/**
* Returns copies of Storables that it iterates over.
diff --git a/src/main/java/com/amazon/carbonado/repo/map/MapRepository.java b/src/main/java/com/amazon/carbonado/repo/map/MapRepository.java index 99b0e3b..f7ea4d7 100644 --- a/src/main/java/com/amazon/carbonado/repo/map/MapRepository.java +++ b/src/main/java/com/amazon/carbonado/repo/map/MapRepository.java @@ -40,8 +40,9 @@ import com.amazon.carbonado.qe.StorageAccess; import com.amazon.carbonado.spi.AbstractRepository;
import com.amazon.carbonado.spi.LobEngine;
-import com.amazon.carbonado.spi.TransactionManager;
-import com.amazon.carbonado.spi.TransactionScope;
+
+import com.amazon.carbonado.txn.TransactionManager;
+import com.amazon.carbonado.txn.TransactionScope;
/**
*
diff --git a/src/main/java/com/amazon/carbonado/repo/map/MapStorage.java b/src/main/java/com/amazon/carbonado/repo/map/MapStorage.java index a15796c..7c2fa0a 100644 --- a/src/main/java/com/amazon/carbonado/repo/map/MapStorage.java +++ b/src/main/java/com/amazon/carbonado/repo/map/MapStorage.java @@ -78,9 +78,10 @@ import com.amazon.carbonado.qe.StorageAccess; import com.amazon.carbonado.spi.IndexInfoImpl;
import com.amazon.carbonado.spi.LobEngine;
-import com.amazon.carbonado.spi.TransactionScope;
import com.amazon.carbonado.spi.TriggerManager;
+import com.amazon.carbonado.txn.TransactionScope;
+
/**
*
*
diff --git a/src/main/java/com/amazon/carbonado/repo/map/MapTransactionManager.java b/src/main/java/com/amazon/carbonado/repo/map/MapTransactionManager.java index 929ab17..2c7b881 100644 --- a/src/main/java/com/amazon/carbonado/repo/map/MapTransactionManager.java +++ b/src/main/java/com/amazon/carbonado/repo/map/MapTransactionManager.java @@ -24,7 +24,7 @@ import com.amazon.carbonado.IsolationLevel; import com.amazon.carbonado.PersistException;
import com.amazon.carbonado.Transaction;
-import com.amazon.carbonado.spi.TransactionManager;
+import com.amazon.carbonado.txn.TransactionManager;
/**
*
diff --git a/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepository.java b/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepository.java index 5aa4243..51dbba8 100644 --- a/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepository.java +++ b/src/main/java/com/amazon/carbonado/repo/replicated/ReplicatedRepository.java @@ -56,7 +56,8 @@ import com.amazon.carbonado.info.StorableIntrospector; import com.amazon.carbonado.repo.indexed.IndexEntryAccessCapability;
import com.amazon.carbonado.spi.StoragePool;
-import com.amazon.carbonado.spi.TransactionPair;
+
+import com.amazon.carbonado.txn.TransactionPair;
import com.amazon.carbonado.util.Throttle;
diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBCursor.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBCursor.java index a0dfe38..41a0a91 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBCursor.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBCursor.java @@ -25,7 +25,7 @@ import com.amazon.carbonado.Storable; import com.amazon.carbonado.raw.RawCursor;
import com.amazon.carbonado.raw.RawUtil;
-import com.amazon.carbonado.spi.TransactionScope;
+import com.amazon.carbonado.txn.TransactionScope;
/**
*
diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java index 9abdd5d..9f3d9ac 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java @@ -64,8 +64,9 @@ import com.amazon.carbonado.sequence.SequenceValueProducer; import com.amazon.carbonado.spi.AbstractRepository;
import com.amazon.carbonado.spi.ExceptionTransformer;
import com.amazon.carbonado.spi.LobEngine;
-import com.amazon.carbonado.spi.TransactionManager;
-import com.amazon.carbonado.spi.TransactionScope;
+
+import com.amazon.carbonado.txn.TransactionManager;
+import com.amazon.carbonado.txn.TransactionScope;
/**
* Repository implementation backed by a Berkeley DB. Data is encoded in the
diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBStorage.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBStorage.java index 45205c7..f4a010b 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBStorage.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBStorage.java @@ -79,9 +79,10 @@ import com.amazon.carbonado.sequence.SequenceValueProducer; import com.amazon.carbonado.spi.IndexInfoImpl;
import com.amazon.carbonado.spi.LobEngine;
-import com.amazon.carbonado.spi.TransactionScope;
import com.amazon.carbonado.spi.TriggerManager;
+import com.amazon.carbonado.txn.TransactionScope;
+
/**
*
* @author Brian S O'Neill
diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBTransactionManager.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBTransactionManager.java index 1e613ca..8ac7fdd 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBTransactionManager.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBTransactionManager.java @@ -26,7 +26,7 @@ import com.amazon.carbonado.PersistException; import com.amazon.carbonado.Transaction;
import com.amazon.carbonado.spi.ExceptionTransformer;
-import com.amazon.carbonado.spi.TransactionManager;
+import com.amazon.carbonado.txn.TransactionManager;
/**
* This class is used for tracking transactions and open cursors.
diff --git a/src/main/java/com/amazon/carbonado/spi/AbstractRepository.java b/src/main/java/com/amazon/carbonado/spi/AbstractRepository.java index e73a8c9..688134b 100644 --- a/src/main/java/com/amazon/carbonado/spi/AbstractRepository.java +++ b/src/main/java/com/amazon/carbonado/spi/AbstractRepository.java @@ -41,6 +41,9 @@ import com.amazon.carbonado.sequence.SequenceCapability; import com.amazon.carbonado.sequence.SequenceValueProducer;
import com.amazon.carbonado.sequence.SequenceValueProducerPool;
+import com.amazon.carbonado.txn.TransactionManager;
+import com.amazon.carbonado.txn.TransactionScope;
+
/**
* Implements basic functionality required by a core Repository.
*
diff --git a/src/main/java/com/amazon/carbonado/spi/TransactionManager.java b/src/main/java/com/amazon/carbonado/txn/TransactionManager.java index 48f52af..4914be9 100644 --- a/src/main/java/com/amazon/carbonado/spi/TransactionManager.java +++ b/src/main/java/com/amazon/carbonado/txn/TransactionManager.java @@ -16,7 +16,7 @@ * limitations under the License.
*/
-package com.amazon.carbonado.spi;
+package com.amazon.carbonado.txn;
import java.util.Map;
import java.util.concurrent.TimeUnit;
diff --git a/src/main/java/com/amazon/carbonado/spi/TransactionPair.java b/src/main/java/com/amazon/carbonado/txn/TransactionPair.java index ff07bc2..f07f57e 100644 --- a/src/main/java/com/amazon/carbonado/spi/TransactionPair.java +++ b/src/main/java/com/amazon/carbonado/txn/TransactionPair.java @@ -16,7 +16,7 @@ * limitations under the License.
*/
-package com.amazon.carbonado.spi;
+package com.amazon.carbonado.txn;
import java.util.concurrent.TimeUnit;
diff --git a/src/main/java/com/amazon/carbonado/spi/TransactionScope.java b/src/main/java/com/amazon/carbonado/txn/TransactionScope.java index bce7804..62b62a3 100644 --- a/src/main/java/com/amazon/carbonado/spi/TransactionScope.java +++ b/src/main/java/com/amazon/carbonado/txn/TransactionScope.java @@ -16,7 +16,7 @@ * limitations under the License.
*/
-package com.amazon.carbonado.spi;
+package com.amazon.carbonado.txn;
import java.util.IdentityHashMap;
import java.util.Map;
@@ -32,6 +32,8 @@ import com.amazon.carbonado.RepositoryException; import com.amazon.carbonado.Storable;
import com.amazon.carbonado.Transaction;
+import com.amazon.carbonado.spi.ExceptionTransformer;
+
/**
* Container of thread local, scoped transactions.
*
diff --git a/src/main/java/com/amazon/carbonado/txn/package-info.java b/src/main/java/com/amazon/carbonado/txn/package-info.java new file mode 100644 index 0000000..717592f --- /dev/null +++ b/src/main/java/com/amazon/carbonado/txn/package-info.java @@ -0,0 +1,22 @@ +/*
+ * Copyright 2008 Amazon Technologies, Inc. or its affiliates.
+ * Amazon, Amazon.com and Carbonado are trademarks or registered trademarks
+ * of Amazon Technologies, Inc. or its affiliates. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Provides support for managing transactions.
+ */
+package com.amazon.carbonado.txn;
|