Add serialVersionUID fields
[controller.git] / opendaylight / md-sal / cds-access-api / src / main / java / org / opendaylight / controller / cluster / access / commands / ConnectClientFailureProxyV1.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.AbstractRequestFailureProxy;
14 import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
15 import org.opendaylight.controller.cluster.access.concepts.RequestException;
16
17 /**
18  * Serialization proxy for use with {@link ConnectClientFailure}. This class implements initial (Boron) serialization
19  * format.
20  *
21  * @author Robert Varga
22  */
23 final class ConnectClientFailureProxyV1 extends AbstractRequestFailureProxy<ClientIdentifier, ConnectClientFailure> {
24     @Serial
25     private static final long serialVersionUID = 2688639416324657256L;
26
27     // checkstyle flags the public modifier as redundant however it is explicitly needed for Java serialization to
28     // be able to create instances via reflection.
29     @SuppressWarnings("checkstyle:RedundantModifier")
30     public ConnectClientFailureProxyV1() {
31         // For Externalizable
32     }
33
34     ConnectClientFailureProxyV1(final ConnectClientFailure failure) {
35         super(failure);
36     }
37
38     @Override
39     protected ConnectClientFailure createFailure(final ClientIdentifier target, final long sequence,
40             final RequestException cause) {
41         return new ConnectClientFailure(target, sequence, cause);
42     }
43
44     @Override
45     protected ClientIdentifier readTarget(final DataInput in) throws IOException {
46         return ClientIdentifier.readFrom(in);
47     }
48 }