2 * Copyright (c) 2015 Brocade Communications 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.md.sal.common.api.clustering;
11 * A DTO that encapsulates ownership state for an entity.
13 * @author Thomas Pantelis
15 * @deprecated Use org.opendaylight.mdsal.common.api.clustering.EntityOwnershipState instead
18 public class EntityOwnershipState {
19 private final boolean isOwner;
20 private final boolean hasOwner;
22 public EntityOwnershipState(boolean isOwner, boolean hasOwner) {
23 this.isOwner = isOwner;
24 this.hasOwner = hasOwner;
28 * Returns the current ownership status of the entity for this process instance.
29 * @return true if this process is the owner of the entity
31 public boolean isOwner() {
36 * Returns the current ownership status of the entity across all process instances.
37 * @return true if the entity has an owner which may or may not be this process. If false, then
38 * the entity has no candidates and thus no owner.
40 public boolean hasOwner() {
45 public String toString() {
46 return "EntityOwnershipState [isOwner=" + isOwner + ", hasOwner=" + hasOwner + "]";