1702f142b656de2115f2e8794a29e87e5aa65241
[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 com.google.common.annotations.Beta;
12 import javax.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  * @author Robert Varga
21  */
22 @Beta
23 public final class ExistsTransactionRequest extends AbstractReadTransactionRequest<ExistsTransactionRequest> {
24     private static final long serialVersionUID = 1L;
25
26     public ExistsTransactionRequest(@Nonnull final TransactionIdentifier identifier, final long sequence,
27             @Nonnull final ActorRef replyTo, @Nonnull final YangInstanceIdentifier path, final boolean snapshotOnly) {
28         super(identifier, sequence, replyTo, path, snapshotOnly);
29     }
30
31     private ExistsTransactionRequest(final ExistsTransactionRequest request, final ABIVersion version) {
32         super(request, version);
33     }
34
35     @Override
36     protected ExistsTransactionRequest cloneAsVersion(final ABIVersion version) {
37         return new ExistsTransactionRequest(this, version);
38     }
39
40     @Override
41     protected ExistsTransactionRequestProxyV1 externalizableProxy(final ABIVersion version) {
42         return new ExistsTransactionRequestProxyV1(this);
43     }
44 }