20b679f420284f70cadb57cf0b51bc290cfdc65d
[controller.git] / opendaylight / md-sal / cds-access-api / src / main / java / org / opendaylight / controller / cluster / access / commands / ReadTransactionRequest.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 read a particular path exists in the current view of a particular transaction.
19  *
20  * @author Robert Varga
21  */
22 @Beta
23 public final class ReadTransactionRequest extends AbstractReadTransactionRequest<ReadTransactionRequest> {
24     private static final long serialVersionUID = 1L;
25
26     public ReadTransactionRequest(final @Nonnull TransactionIdentifier identifier, final @Nonnull ActorRef replyTo,
27             final @Nonnull YangInstanceIdentifier path) {
28         super(identifier, replyTo, path);
29     }
30
31     private ReadTransactionRequest(final ReadTransactionRequest request, final ABIVersion version) {
32         super(request, version);
33     }
34
35     @Override
36     protected ReadTransactionRequest cloneAsVersion(final ABIVersion version) {
37         return new ReadTransactionRequest(this, version);
38     }
39
40     @Override
41     protected ReadTransactionRequestProxyV1 externalizableProxy(final ABIVersion version) {
42         return new ReadTransactionRequestProxyV1(this);
43     }
44 }