summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2011-01-11 23:34:03 +0000
committerBrian S. O'Neill <bronee@gmail.com>2011-01-11 23:34:03 +0000
commitb5003361c91c9161593cc413a72493543fe25c60 (patch)
tree3f8e09aa716d9cd7883997dcb10ad191a90da0f8 /src/main/java/com/amazon/carbonado
parentd8b0a17836099a976b415dbb45a6f7e0645e3ce6 (diff)
Added option to set max transactions.
Diffstat (limited to 'src/main/java/com/amazon/carbonado')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java
index 7605b30..0c66487 100644
--- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java
+++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java
@@ -97,6 +97,7 @@ public final class BDBRepositoryBuilder extends AbstractRepositoryBuilder {
private double mTxnTimeout = 300.0;
private boolean mTxnNoSync;
private boolean mTxnWriteNoSync;
+ private Integer mTxnMaxActive;
private Boolean mDatabasesTransactional = null;
private boolean mReverseSplitOff;
private Map<Class<?>, Integer> mDatabasePageSizes;
@@ -555,6 +556,22 @@ public final class BDBRepositoryBuilder extends AbstractRepositoryBuilder {
}
/**
+ * Set the maximum number of concurrent transactions, or pass null to use
+ * the default. This setting has no effect for BDB-JE.
+ */
+ public void setTransactionMaxActive(Integer max) {
+ mTxnMaxActive = max;
+ }
+
+ /**
+ * Returns the maximum number of concurrent transactions, or null if the
+ * default is used.
+ */
+ public Integer getTransactionMaxActive() {
+ return mTxnMaxActive;
+ }
+
+ /**
* When true, allows databases to be transactional. This setting affects
* the databases, not the environment. If this is not explicitly set, the
* environment getTransactional is used.