summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/repo/sleepycat
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2006-10-17 23:32:59 +0000
committerBrian S. O'Neill <bronee@gmail.com>2006-10-17 23:32:59 +0000
commit30cc7f1c3943be87573849864f1f0637fd5cc3c6 (patch)
treeaf8c1e479d97bed96eb28e6fc55358f48c71fa74 /src/main/java/com/amazon/carbonado/repo/sleepycat
parent987e5b79304062308a5d304a57dabcce97654867 (diff)
Prevent accidental replication of internal storables.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo/sleepycat')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java15
-rw-r--r--src/main/java/com/amazon/carbonado/repo/sleepycat/StoredDatabaseInfo.java4
2 files changed, 7 insertions, 12 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java
index b97ec14..3e2feaf 100644
--- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java
+++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java
@@ -459,19 +459,10 @@ abstract class BDBRepository<Txn>
}
LobEngine getLobEngine() throws RepositoryException {
- LobEngine engine = mLobEngine;
- if (engine == null) {
- lockoutShutdown();
- try {
- if ((engine = mLobEngine) == null) {
- mLobEngine = engine = new LobEngine(this);
- }
- return engine;
- } finally {
- unlockoutShutdown();
- }
+ if (mLobEngine == null) {
+ mLobEngine = new LobEngine(getRootRepository());
}
- return engine;
+ return mLobEngine;
}
/**
diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/StoredDatabaseInfo.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/StoredDatabaseInfo.java
index 9925e01..ae005b3 100644
--- a/src/main/java/com/amazon/carbonado/repo/sleepycat/StoredDatabaseInfo.java
+++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/StoredDatabaseInfo.java
@@ -18,6 +18,8 @@
package com.amazon.carbonado.repo.sleepycat;
+import com.amazon.carbonado.Alias;
+import com.amazon.carbonado.Independent;
import com.amazon.carbonado.Nullable;
import com.amazon.carbonado.PrimaryKey;
import com.amazon.carbonado.Storable;
@@ -35,6 +37,8 @@ import com.amazon.carbonado.repo.indexed.Unindexed;
* @author Brian S O'Neill
*/
@PrimaryKey("databaseName")
+@Independent
+@Alias("CARBONADO_DATABASE_INFO")
public abstract class StoredDatabaseInfo implements Storable, Unevolvable, Unindexed {
/** Evolution strategy code */
public static final int EVOLUTION_NONE = 0, EVOLUTION_STANDARD = 1;