BUG-5280: add basic concept of ClientSnapshot
[controller.git] / opendaylight / md-sal / cds-access-api / src / main / java / org / opendaylight / controller / cluster / access / commands / AbstractReadTransactionRequest.java
index 17054f78a25725ae43ff1631bc3332512d74c494..6510d5b5b41ffeb9a90f53e25096af034b905041 100644 (file)
@@ -33,16 +33,19 @@ public abstract class AbstractReadTransactionRequest<T extends AbstractReadTrans
         extends TransactionRequest<T> {
     private static final long serialVersionUID = 1L;
     private final YangInstanceIdentifier path;
+    private final boolean snapshotOnly;
 
     AbstractReadTransactionRequest(final TransactionIdentifier identifier, final long sequence, final ActorRef replyTo,
-        final YangInstanceIdentifier path) {
+        final YangInstanceIdentifier path, final boolean snapshotOnly) {
         super(identifier, sequence, replyTo);
         this.path = Preconditions.checkNotNull(path);
+        this.snapshotOnly = snapshotOnly;
     }
 
     AbstractReadTransactionRequest(final T request, final ABIVersion version) {
         super(request, version);
         this.path = request.getPath();
+        this.snapshotOnly = request.isSnapshotOnly();
     }
 
     @Nonnull
@@ -50,6 +53,10 @@ public abstract class AbstractReadTransactionRequest<T extends AbstractReadTrans
         return path;
     }
 
+    public final boolean isSnapshotOnly() {
+        return snapshotOnly;
+    }
+
     @Override
     protected ToStringHelper addToStringAttributes(final ToStringHelper toStringHelper) {
         return super.addToStringAttributes(toStringHelper).add("path", path);