summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/repo/sleepycat
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo/sleepycat')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java2
-rw-r--r--src/main/java/com/amazon/carbonado/repo/sleepycat/BDBStorage.java8
2 files changed, 6 insertions, 4 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 b423ab9..eb10042 100644
--- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java
+++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBRepository.java
@@ -354,7 +354,7 @@ abstract class BDBRepository<Txn> extends AbstractRepository<Txn>
throws FetchException, PersistException
{
try {
- return ((BDBStorage) storageFor(type)).getLayout(mStorableCodecFactory);
+ return ((BDBStorage) storageFor(type)).getLayout(true, mStorableCodecFactory);
} catch (PersistException e) {
throw e;
} catch (RepositoryException e) {
diff --git a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBStorage.java b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBStorage.java
index 66e8475..f4d8f24 100644
--- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBStorage.java
+++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBStorage.java
@@ -419,7 +419,7 @@ abstract class BDBStorage<Txn, S extends Storable> implements Storage<S>, Storag
{
StorableInfo<S> info = StorableIntrospector.examine(getStorableType());
StorableCodecFactory codecFactory = mRepository.getStorableCodecFactory();
- final Layout layout = getLayout(codecFactory);
+ final Layout layout = getLayout(readOnly, codecFactory);
// Open primary database.
Object primaryDatabase;
@@ -766,7 +766,9 @@ abstract class BDBStorage<Txn, S extends Storable> implements Storage<S>, Storag
}
}
- Layout getLayout(StorableCodecFactory codecFactory) throws RepositoryException {
+ Layout getLayout(boolean readOnly, StorableCodecFactory codecFactory)
+ throws RepositoryException
+ {
if (Unevolvable.class.isAssignableFrom(getStorableType())) {
// Don't record generation for storables marked as unevolvable.
return null;
@@ -782,7 +784,7 @@ abstract class BDBStorage<Txn, S extends Storable> implements Storage<S>, Storag
}
Class<S> type = getStorableType();
- return factory.layoutFor(type, codecFactory.getLayoutOptions(type));
+ return factory.layoutFor(readOnly, type, codecFactory.getLayoutOptions(type));
}
/**