Track skipped transactions
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / ShardDataTreeMetadata.java
index 7db3a228c8023f16f9ab975c26f4c76effe7e44c..76719f94f839f13f127dc3ed180fa6c4fffdf733 100644 (file)
@@ -8,11 +8,12 @@
 package org.opendaylight.controller.cluster.datastore;
 
 import com.google.common.base.Verify;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
 import org.opendaylight.controller.cluster.datastore.persisted.ShardDataTreeSnapshotMetadata;
+import org.opendaylight.controller.cluster.datastore.utils.ImmutableUnsignedLongSet;
 
 abstract class ShardDataTreeMetadata<T extends ShardDataTreeSnapshotMetadata<T>> {
     /**
@@ -20,7 +21,7 @@ abstract class ShardDataTreeMetadata<T extends ShardDataTreeSnapshotMetadata<T>>
      *
      * @param snapshot Metadata snapshot
      */
-    final void applySnapshot(@Nonnull final ShardDataTreeSnapshotMetadata<?> snapshot) {
+    final void applySnapshot(final @NonNull ShardDataTreeSnapshotMetadata<?> snapshot) {
         Verify.verify(getSupportedType().isInstance(snapshot), "Snapshot %s misrouted to handler of %s", snapshot,
             getSupportedType());
         doApplySnapshot(getSupportedType().cast(snapshot));
@@ -37,14 +38,14 @@ abstract class ShardDataTreeMetadata<T extends ShardDataTreeSnapshotMetadata<T>>
      *
      * @param snapshot Metadata snapshot
      */
-    abstract void doApplySnapshot(@Nonnull T snapshot);
+    abstract void doApplySnapshot(@NonNull T snapshot);
 
     /**
      * Return the type of metadata snapshot this object supports.
      *
      * @return Metadata type
      */
-    abstract @Nonnull Class<T> getSupportedType();
+    abstract @NonNull Class<T> getSupportedType();
 
     /**
      * Take a snapshot of current metadata state.
@@ -61,6 +62,8 @@ abstract class ShardDataTreeMetadata<T extends ShardDataTreeSnapshotMetadata<T>>
 
     abstract void onTransactionPurged(TransactionIdentifier txId);
 
+    abstract void onTransactionsSkipped(LocalHistoryIdentifier historyId, ImmutableUnsignedLongSet txIds);
+
     abstract void onHistoryCreated(LocalHistoryIdentifier historyId);
 
     abstract void onHistoryClosed(LocalHistoryIdentifier historyId);