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.IOException;
11 import java.io.ObjectInput;
12 import org.opendaylight.controller.cluster.access.ABIVersion;
13 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
16 * Response to a {@link ModifyTransactionRequest} which does not have a {@link PersistenceProtocol}.
18 public final class ModifyTransactionSuccess extends TransactionSuccess<ModifyTransactionSuccess> {
19 interface SerialForm extends TransactionSuccess.SerialForm<ModifyTransactionSuccess> {
21 default ModifyTransactionSuccess readExternal(final ObjectInput in, final TransactionIdentifier target,
22 final long sequence) throws IOException {
23 return new ModifyTransactionSuccess(target, sequence);
28 private static final long serialVersionUID = 1L;
30 public ModifyTransactionSuccess(final TransactionIdentifier identifier, final long sequence) {
31 super(identifier, sequence);
34 private ModifyTransactionSuccess(final ModifyTransactionSuccess success, final ABIVersion version) {
35 super(success, version);
39 protected SerialForm externalizableProxy(final ABIVersion version) {
40 return ABIVersion.MAGNESIUM.lt(version) ? new MTS(this) : new ModifyTransactionSuccessProxyV1(this);
44 protected ModifyTransactionSuccess cloneAsVersion(final ABIVersion version) {
45 return new ModifyTransactionSuccess(this, version);