From b5003361c91c9161593cc413a72493543fe25c60 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Tue, 11 Jan 2011 23:34:03 +0000 Subject: Added option to set max transactions. --- .../carbonado/repo/sleepycat/BDBRepositoryBuilder.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/main/java/com/amazon/carbonado') 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, Integer> mDatabasePageSizes; @@ -554,6 +555,22 @@ public final class BDBRepositoryBuilder extends AbstractRepositoryBuilder { return mTxnWriteNoSync; } + /** + * 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 -- cgit v1.2.3