BUG-5280: add frontend state lifecycle
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / FrontendTransaction.java
index 1ef775e041d6cc51222db6852d285cc1627ef597..fccf3bf4a1d321384dafb49cf213cbea3f313922 100644 (file)
@@ -112,6 +112,9 @@ abstract class FrontendTransaction implements Identifiable<TransactionIdentifier
     abstract @Nullable TransactionSuccess<?> handleRequest(TransactionRequest<?> request,
             RequestEnvelope envelope, long now) throws RequestException;
 
+    // Final request, needs routing to the data tree, so it can persist a tombstone
+    abstract void purge(Runnable callback);
+
     private void recordResponse(final long sequence, final Object response) {
         if (replayQueue.isEmpty()) {
             firstReplaySequence = sequence;
@@ -148,4 +151,5 @@ abstract class FrontendTransaction implements Identifiable<TransactionIdentifier
                 .add("lastPurgedSequence", lastPurgedSequence)
                 .toString();
     }
+
 }