summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/sleepycat/BDBProduct.java27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBProduct.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBProduct.java
index 9b48753..6053a23 100644
--- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBProduct.java
+++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBProduct.java
@@ -30,6 +30,13 @@ public enum BDBProduct {
/** BDB Native */
DB,
+ /**
+ * BDB Native, with reduced concurrency to eliminate deadlocks. Exclusive
+ * lock is held when modifications are made, and at most one open
+ * transaction is allowed at any given time.
+ */
+ DBX,
+
/** BDB Native, High Availability */
DB_HA,
@@ -38,15 +45,17 @@ public enum BDBProduct {
public static BDBProduct forString(String name) {
name = name.toLowerCase();
- if (name.equals("db_legacy")) {
- return DB_Legacy;
- } else if (name.equals("db")) {
- return DB;
- } else if (name.equals("db_ha")) {
- return DB_HA;
- } else if (name.equals("je")) {
- return JE;
- }
+ if (name.equals("db_legacy")) {
+ return DB_Legacy;
+ } else if (name.equals("db")) {
+ return DB;
+ } else if (name.equals("dbx")) {
+ return DBX;
+ } else if (name.equals("db_ha")) {
+ return DB_HA;
+ } else if (name.equals("je")) {
+ return JE;
+ }
throw new IllegalArgumentException("Unsupported product: " + name);
}
}