From 88cef0977ef84997b20be85acfac1c3b269fde1c Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Tue, 17 Jan 2012 18:18:56 +0000 Subject: Add support for dbx repository type. --- .../carbonado/repo/sleepycat/BDBProduct.java | 27 ++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'src') 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); } } -- cgit v1.2.3