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 java.io.Serial;
13 import org.opendaylight.controller.cluster.access.concepts.AbstractRequestFailureProxy;
14 import org.opendaylight.controller.cluster.access.concepts.RequestException;
15 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
18 * Externalizable proxy for use with {@link TransactionFailure}. It implements the initial (Boron) serialization
21 * @author Robert Varga
23 final class TransactionFailureProxyV1 extends AbstractRequestFailureProxy<TransactionIdentifier, TransactionFailure> {
25 private static final long serialVersionUID = 1L;
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 TransactionFailureProxyV1() {
34 TransactionFailureProxyV1(final TransactionFailure failure) {
39 protected TransactionFailure createFailure(final TransactionIdentifier target, final long sequence,
40 final RequestException cause) {
41 return new TransactionFailure(target, sequence, cause);
45 protected TransactionIdentifier readTarget(final DataInput in) throws IOException {
46 return TransactionIdentifier.readFrom(in);