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