More cds-access-api cleanup
[controller.git] / opendaylight / md-sal / cds-access-api / src / main / java / org / opendaylight / controller / cluster / access / commands / TransactionPreCommitRequestProxyV1.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.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
13
14 /**
15  * Externalizable proxy for use with {@link TransactionPreCommitRequest}. It implements the initial (Boron)
16  * serialization format.
17  *
18  * @author Robert Varga
19  */
20 final class TransactionPreCommitRequestProxyV1 extends AbstractTransactionRequestProxy<TransactionPreCommitRequest> {
21     @Serial
22     private static final long serialVersionUID = 1L;
23
24     // checkstyle flags the public modifier as redundant however it is explicitly needed for Java serialization to
25     // be able to create instances via reflection.
26     @SuppressWarnings("checkstyle:RedundantModifier")
27     public TransactionPreCommitRequestProxyV1() {
28         // For Externalizable
29     }
30
31     TransactionPreCommitRequestProxyV1(final TransactionPreCommitRequest request) {
32         super(request);
33     }
34
35     @Override
36     protected TransactionPreCommitRequest createRequest(final TransactionIdentifier target, final long sequence,
37             final ActorRef replyTo) {
38         return new TransactionPreCommitRequest(target, sequence, replyTo);
39     }
40 }