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 java.io.ObjectOutput;
13 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
16 * Externalizable proxy for use with {@link ExistsTransactionSuccess}. It implements the initial (Boron) serialization
19 * @author Robert Varga
21 final class ExistsTransactionSuccessProxyV1 extends AbstractTransactionSuccessProxy<ExistsTransactionSuccess> {
22 private static final long serialVersionUID = 1L;
23 private boolean exists;
25 public ExistsTransactionSuccessProxyV1() {
29 ExistsTransactionSuccessProxyV1(final ExistsTransactionSuccess request) {
31 this.exists = request.getExists();
35 public void writeExternal(final ObjectOutput out) throws IOException {
36 super.writeExternal(out);
37 out.writeBoolean(exists);
41 public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
42 super.readExternal(in);
43 exists = in.readBoolean();
47 protected ExistsTransactionSuccess createSuccess(final TransactionIdentifier target) {
48 return new ExistsTransactionSuccess(target, exists);