diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2012-01-17 18:18:56 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2012-01-17 18:18:56 +0000 |
commit | 88cef0977ef84997b20be85acfac1c3b269fde1c (patch) | |
tree | a1c3651e2585f44dbeda700a2d2de5f8c367cbc0 /src | |
parent | 655b0625fa801fa8fc8e91d7b08300ada531c34e (diff) |
Add support for dbx repository type.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/sleepycat/BDBProduct.java | 27 |
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);
}
}
|