diff options
Diffstat (limited to 'src/main/java/com/amazon/carbonado')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java | 17 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/sleepycat/HotBackupCapability.java | 7 |
2 files changed, 22 insertions, 2 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 1497417..9301f28 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepositoryBuilder.java @@ -101,6 +101,7 @@ public class BDBRepositoryBuilder extends AbstractRepositoryBuilder { private boolean mPrivate;
private boolean mMultiversion;
private boolean mLogInMemory;
+ private boolean mRunFullRecovery;
private boolean mRunCheckpointer = true;
private int mCheckpointInterval = DEFAULT_CHECKPOINT_INTERVAL;
private boolean mRunDeadlockDetector = true;
@@ -626,6 +627,22 @@ public class BDBRepositoryBuilder extends AbstractRepositoryBuilder { }
/**
+ * Pass true to override the default and run a full (catastrophic) recovery
+ * when environment is opened. This setting has no effect for BDB-JE.
+ */
+ public void setRunFullRecovery(boolean runRecovery) {
+ mRunFullRecovery = runRecovery;
+ }
+
+ /**
+ * Returns true if a full (catastrophic) recovery should be performed when
+ * environment is opened.
+ */
+ public boolean getRunFullRecovery() {
+ return mRunFullRecovery;
+ }
+
+ /**
* Disable automatic checkpointing of database if another process is
* responsible for that. The false setting is implied for read-only
* databases.
diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/HotBackupCapability.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/HotBackupCapability.java index 8bce86d..c65d2c8 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/HotBackupCapability.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/HotBackupCapability.java @@ -25,7 +25,10 @@ import com.amazon.carbonado.RepositoryException; import com.amazon.carbonado.capability.Capability;
/**
- * Capability for performing a backup of an active BDB environment.
+ * Capability for performing a backup of an active BDB environment. To restore
+ * from a hot backup, it is <b>critical</b> that a full recovery be
+ * performed. BDB-JE does not require this, however. Pass true to {@link
+ * BDBRepositoryBuilder#setRunFullRecovery(boolean)} to enable.
*
* @author Brian S O'Neill
* @since 1.2.1
@@ -33,7 +36,7 @@ import com.amazon.carbonado.capability.Capability; public interface HotBackupCapability extends Capability {
/**
* Starts the backup by disabling log file deletion. Be sure to call
- * endBackup when done to resume log file cleanup. Concurrent backups is
+ * endBackup when done to resume log file cleanup. Concurrent backups are
* supported.
*/
Backup startBackup() throws RepositoryException;
|