More cds-access-api cleanup
[controller.git] / opendaylight / md-sal / cds-access-api / src / main / java / org / opendaylight / controller / cluster / access / commands / TransactionCanCommitSuccessProxyV1.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.IOException;
11 import java.io.ObjectInput;
12 import java.io.ObjectOutput;
13 import java.io.Serial;
14 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
15
16 /**
17  * Externalizable proxy for use with {@link TransactionCanCommitSuccess}. It implements the initial (Boron)
18  * serialization format.
19  *
20  * @author Robert Varga
21  */
22 final class TransactionCanCommitSuccessProxyV1 extends AbstractTransactionSuccessProxy<TransactionCanCommitSuccess> {
23     @Serial
24     private static final long serialVersionUID = 1L;
25
26     // checkstyle flags the public modifier as redundant however it is explicitly needed for Java serialization to
27     // be able to create instances via reflection.
28     @SuppressWarnings("checkstyle:RedundantModifier")
29     public TransactionCanCommitSuccessProxyV1() {
30         // For Externalizable
31     }
32
33     TransactionCanCommitSuccessProxyV1(final TransactionCanCommitSuccess success) {
34         super(success);
35     }
36
37     @Override
38     public void writeExternal(final ObjectOutput out) throws IOException {
39         super.writeExternal(out);
40     }
41
42     @Override
43     public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
44         super.readExternal(in);
45     }
46
47     @Override
48     protected TransactionCanCommitSuccess createSuccess(final TransactionIdentifier target, final long sequence) {
49         return new TransactionCanCommitSuccess(target, sequence);
50     }
51 }