From 4ceddfc456e83a79e782599b5b86b68e38b6ef94 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Sat, 14 Oct 2006 17:22:20 +0000 Subject: Added support for memory-only transaction logs. --- .../carbonado/repo/sleepycat/BDBRepositoryBuilder.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/main/java/com/amazon') 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, 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; @@ -505,6 +506,22 @@ public class BDBRepositoryBuilder extends AbstractRepositoryBuilder { return mMultiversion; } + /** + * 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 -- cgit v1.2.3