summaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/indexed/DerivedIndexesTrigger.java5
-rw-r--r--src/main/java/com/amazon/carbonado/repo/indexed/IndexesTrigger.java10
2 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/indexed/DerivedIndexesTrigger.java b/src/main/java/com/amazon/carbonado/repo/indexed/DerivedIndexesTrigger.java
index bcb866b..8f2afde 100644
--- a/src/main/java/com/amazon/carbonado/repo/indexed/DerivedIndexesTrigger.java
+++ b/src/main/java/com/amazon/carbonado/repo/indexed/DerivedIndexesTrigger.java
@@ -75,6 +75,11 @@ class DerivedIndexesTrigger<S extends Storable, D extends Storable> extends Trig
}
@Override
+ public Object beforeTryDelete(Transaction txn, S storable) throws PersistException {
+ return beforeDelete(txn, storable);
+ }
+
+ @Override
public Object beforeDelete(Transaction txn, S storable) throws PersistException {
txn.setForUpdate(true);
try {
diff --git a/src/main/java/com/amazon/carbonado/repo/indexed/IndexesTrigger.java b/src/main/java/com/amazon/carbonado/repo/indexed/IndexesTrigger.java
index 67f29e8..4c5840a 100644
--- a/src/main/java/com/amazon/carbonado/repo/indexed/IndexesTrigger.java
+++ b/src/main/java/com/amazon/carbonado/repo/indexed/IndexesTrigger.java
@@ -64,6 +64,11 @@ class IndexesTrigger<S extends Storable> extends Trigger<S> {
}
@Override
+ public Object beforeTryUpdate(Transaction txn, S storable) throws PersistException {
+ return beforeUpdate(txn, storable);
+ }
+
+ @Override
public Object beforeUpdate(Transaction txn, S storable) throws PersistException {
// Ensure old storable is loaded with an upgradable lock, allowing
// update to proceed without deadlock.
@@ -93,6 +98,11 @@ class IndexesTrigger<S extends Storable> extends Trigger<S> {
}
@Override
+ public Object beforeTryDelete(Transaction txn, S storable) throws PersistException {
+ return beforeDelete(txn, storable);
+ }
+
+ @Override
public Object beforeDelete(Transaction txn, S storable) throws PersistException {
// Ensure old storable is loaded with an upgradable lock, allowing
// delete to proceed without deadlock.