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 com.google.common.annotations.Beta;
11 import com.google.common.base.MoreObjects.ToStringHelper;
12 import org.opendaylight.controller.cluster.access.ABIVersion;
13 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
16 * Successful reply to an {@link ExistsTransactionRequest}. It indicates presence of requested data via
17 * {@link #getExists()}.
19 * @author Robert Varga
22 public final class ExistsTransactionSuccess extends TransactionSuccess<ExistsTransactionSuccess> {
23 private static final long serialVersionUID = 1L;
24 private final boolean exists;
26 public ExistsTransactionSuccess(final TransactionIdentifier target, final long sequence, final boolean exists) {
27 super(target, sequence);
31 public boolean getExists() {
36 protected ExistsTransactionSuccessProxyV1 externalizableProxy(final ABIVersion version) {
37 return new ExistsTransactionSuccessProxyV1(this);
41 protected ExistsTransactionSuccess cloneAsVersion(final ABIVersion version) {
46 protected ToStringHelper addToStringAttributes(final ToStringHelper toStringHelper) {
47 return super.addToStringAttributes(toStringHelper).add("exists", exists);