Promote cds-access-api
[controller.git] / opendaylight / md-sal / cds-access-api / src / main / java / org / opendaylight / controller / cluster / access / commands / ExistsTransactionRequest.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.cluster.access.commands;
9
10 import akka.actor.ActorRef;
11 import java.io.Serial;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.controller.cluster.access.ABIVersion;
14 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
15 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
16
17 /**
18  * A transaction request to query if a particular path exists in the current view of a particular transaction.
19  */
20 public final class ExistsTransactionRequest extends AbstractReadPathTransactionRequest<ExistsTransactionRequest> {
21     @Serial
22     private static final long serialVersionUID = 1L;
23
24     public ExistsTransactionRequest(final @NonNull TransactionIdentifier identifier, final long sequence,
25             final @NonNull  ActorRef replyTo, final @NonNull YangInstanceIdentifier path, final boolean snapshotOnly) {
26         super(identifier, sequence, replyTo, path, snapshotOnly);
27     }
28
29     private ExistsTransactionRequest(final ExistsTransactionRequest request, final ABIVersion version) {
30         super(request, version);
31     }
32
33     @Override
34     protected ExistsTransactionRequest cloneAsVersion(final ABIVersion version) {
35         return new ExistsTransactionRequest(this, version);
36     }
37
38     @Override
39     protected ExistsTransactionRequestProxyV1 externalizableProxy(final ABIVersion version) {
40         return new ExistsTransactionRequestProxyV1(this);
41     }
42 }