BUG-5280: separate request sequence and transmit sequence
[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 org.opendaylight.controller.cluster.access.concepts.AbstractSuccessProxy;
13 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
14
15 /**
16  * Serialization proxy associated with {@link LocalHistorySuccess}.
17  *
18  * @author Robert Varga
19  */
20 final class LocalHistorySuccessProxyV1 extends AbstractSuccessProxy<LocalHistoryIdentifier, LocalHistorySuccess> {
21     private static final long serialVersionUID = 1L;
22
23     LocalHistorySuccessProxyV1() {
24         // For Externalizable
25     }
26
27     LocalHistorySuccessProxyV1(final LocalHistorySuccess success) {
28         super(success);
29     }
30
31     @Override
32     protected final LocalHistoryIdentifier readTarget(final DataInput in) throws IOException {
33         return LocalHistoryIdentifier.readFrom(in);
34     }
35
36     @Override
37     protected LocalHistorySuccess createSuccess(final LocalHistoryIdentifier target, final long sequence) {
38         return new LocalHistorySuccess(target, sequence);
39     }
40 }