2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.controller.cluster.access.commands;
10 import java.io.DataInput;
11 import java.io.IOException;
12 import org.opendaylight.controller.cluster.access.concepts.AbstractRequestFailureProxy;
13 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
14 import org.opendaylight.controller.cluster.access.concepts.RequestException;
17 * Externalizable proxy for use with {@link LocalHistoryFailure}. It implements the initial (Boron) serialization
20 * @author Robert Varga
22 final class LocalHistoryFailureProxyV1 extends
23 AbstractRequestFailureProxy<LocalHistoryIdentifier, LocalHistoryFailure> {
24 private static final long serialVersionUID = 1L;
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 LocalHistoryFailureProxyV1() {
33 LocalHistoryFailureProxyV1(final LocalHistoryFailure failure) {
38 protected LocalHistoryFailure createFailure(final LocalHistoryIdentifier target, final long sequence,
39 final RequestException cause) {
40 return new LocalHistoryFailure(target, sequence, cause);
44 protected LocalHistoryIdentifier readTarget(final DataInput in) throws IOException {
45 return LocalHistoryIdentifier.readFrom(in);