From 66eeb92b1a496c248a52a17ac0b8620cc7920f26 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Thu, 20 Jan 2011 00:58:24 +0000 Subject: Add option to set max locks; increase default number of lockers. --- .../amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/main/java/com/amazon/carbonado/repo/sleepycat') 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 0c66487..2a7a931 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java @@ -94,6 +94,7 @@ public final class BDBRepositoryBuilder extends AbstractRepositoryBuilder { private Long mCacheSize; private Integer mCachePercent; private double mLockTimeout = 0.5; + private Integer mMaxLocks; private double mTxnTimeout = 300.0; private boolean mTxnNoSync; private boolean mTxnWriteNoSync; @@ -501,6 +502,14 @@ public final class BDBRepositoryBuilder extends AbstractRepositoryBuilder { return inMicros(mLockTimeout); } + public void setMaxLocks(Integer max) { + mMaxLocks = max; + } + + public Integer getMaxLocks() { + return mMaxLocks; + } + /** * Set the transaction timeout, in seconds. Default value is 300 seconds. */ -- cgit v1.2.3