b37227056a131d76331c6d3d30502a527e21eb16
[controller.git] / opendaylight / md-sal / cds-access-api / src / main / java / org / opendaylight / controller / cluster / access / commands / AbstractTransactionRequestProxy.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 java.io.DataInput;
11 import java.io.IOException;
12 import java.io.Serial;
13 import org.opendaylight.controller.cluster.access.concepts.AbstractRequestProxy;
14 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
15
16 /**
17  * Abstract base class for serialization proxies associated with {@link TransactionRequest}s.
18  *
19  * @author Robert Varga
20  *
21  * @param <T> Message type
22  */
23 abstract class AbstractTransactionRequestProxy<T extends TransactionRequest<T>>
24         extends AbstractRequestProxy<TransactionIdentifier, T> {
25     @Serial
26     private static final long serialVersionUID = 1L;
27
28     AbstractTransactionRequestProxy() {
29         // For Externalizable
30     }
31
32     AbstractTransactionRequestProxy(final T request) {
33         super(request);
34     }
35
36     @Override
37     protected final TransactionIdentifier readTarget(final DataInput in) throws IOException {
38         return TransactionIdentifier.readFrom(in);
39     }
40 }