Fix CS warnings in cds-access-api and enable enforcement
[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 org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
14
15 /**
16  * Externalizable proxy for use with {@link TransactionCanCommitSuccess}. It implements the initial (Boron)
17  * serialization format.
18  *
19  * @author Robert Varga
20  */
21 final class TransactionCanCommitSuccessProxyV1 extends AbstractTransactionSuccessProxy<TransactionCanCommitSuccess> {
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 TransactionCanCommitSuccessProxyV1() {
28         // For Externalizable
29     }
30
31     TransactionCanCommitSuccessProxyV1(final TransactionCanCommitSuccess success) {
32         super(success);
33     }
34
35     @Override
36     public void writeExternal(final ObjectOutput out) throws IOException {
37         super.writeExternal(out);
38     }
39
40     @Override
41     public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
42         super.readExternal(in);
43     }
44
45     @Override
46     protected TransactionCanCommitSuccess createSuccess(final TransactionIdentifier target, final long sequence) {
47         return new TransactionCanCommitSuccess(target, sequence);
48     }
49 }