summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/amazon')
-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 3a6d476..695f520 100644
--- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java
+++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java
@@ -95,6 +95,7 @@ public class BDBRepositoryBuilder extends AbstractRepositoryBuilder {
private Map<Class<?>, Integer> mDatabasePageSizes;
private boolean mPrivate;
private boolean mMultiversion;
+ private boolean mLogInMemory;
private boolean mRunCheckpointer = true;
private int mCheckpointInterval = DEFAULT_CHECKPOINT_INTERVAL;
private boolean mRunDeadlockDetector = true;
@@ -506,6 +507,22 @@ public class BDBRepositoryBuilder extends AbstractRepositoryBuilder {
}
/**
+ * Set true to store transaction logs in memory only instead of persistent
+ * storage. For BDB products which are entirely log based, no records are
+ * ever persisted.
+ */
+ public void setLogInMemory(boolean logInMemory) {
+ mLogInMemory = true;
+ }
+
+ /**
+ * Returns false by default, indicating that transaction logs are persisted.
+ */
+ public boolean getLogInMemory() {
+ return mLogInMemory;
+ }
+
+ /**
* Disable automatic checkpointing of database if another process is
* responsible for that. The false setting is implied for read-only
* databases.