diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2006-10-17 00:08:26 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2006-10-17 00:08:26 +0000 |
commit | 987e5b79304062308a5d304a57dabcce97654867 (patch) | |
tree | 25b7adfef1834d5ede463429b89eb4cfaf76f076 /src/main/java/com/amazon/carbonado/repo | |
parent | 75edf91be7467ee8cd10f6ad5c95dbd8007453ff (diff) |
More work on automatic triggers.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo')
3 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java index df61ecf..b06bf99 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java @@ -96,7 +96,7 @@ class JDBCStorage<S extends Storable> extends StandardQueryFactory<S> final TriggerManager<S> mTriggerManager;
JDBCStorage(JDBCRepository repository, JDBCStorableInfo<S> info)
- throws SupportException
+ throws SupportException, RepositoryException
{
super(info.getStorableType());
mRepository = repository;
diff --git a/src/main/java/com/amazon/carbonado/repo/logging/LoggingStorage.java b/src/main/java/com/amazon/carbonado/repo/logging/LoggingStorage.java index 47d6bb1..3f807c2 100644 --- a/src/main/java/com/amazon/carbonado/repo/logging/LoggingStorage.java +++ b/src/main/java/com/amazon/carbonado/repo/logging/LoggingStorage.java @@ -22,6 +22,7 @@ import com.amazon.carbonado.FetchException; import com.amazon.carbonado.PersistException;
import com.amazon.carbonado.Query;
import com.amazon.carbonado.Repository;
+import com.amazon.carbonado.RepositoryException;
import com.amazon.carbonado.Storable;
import com.amazon.carbonado.Storage;
@@ -35,7 +36,7 @@ import com.amazon.carbonado.spi.WrappedStorage; class LoggingStorage<S extends Storable> extends WrappedStorage<S> {
final LoggingRepository mRepo;
- LoggingStorage(LoggingRepository repo, Storage<S> storage) {
+ LoggingStorage(LoggingRepository repo, Storage<S> storage) throws RepositoryException {
super(storage, repo.mTriggerFactories);
mRepo = repo;
}
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 b885399..20ab89f 100644 --- a/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBStorage.java +++ b/src/main/java/com/amazon/carbonado/repo/sleepycat/BDBStorage.java @@ -131,7 +131,7 @@ abstract class BDBStorage<Txn, S extends Storable> implements Storage<S>, Storag mRepository = repository;
mType = type;
mRawSupport = new Support<Txn, S>(repository, this);
- mTriggerManager = new TriggerManager<S>(type, repository.mTriggerFactories);
+ mTriggerManager = new TriggerManager<S>();
try {
// Ask if any lobs via static method first, to prevent stack
// overflow that occurs when creating BDBStorage instances for
@@ -466,6 +466,9 @@ abstract class BDBStorage<Txn, S extends Storable> implements Storage<S>, Storag mPrimaryDatabase = primaryDatabase;
mQueryEngine = new QueryEngine<S>(getStorableType(), mRepository);
+
+ // Don't install automatic triggers until we're completely ready.
+ mTriggerManager.addTriggers(getStorableType(), mRepository.mTriggerFactories);
}
protected S instantiate(byte[] key, byte[] value) throws FetchException {
|