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.mdsal.dom.api.clustering;
10 import com.google.common.annotations.Beta;
11 import com.google.common.base.Optional;
12 import javax.annotation.Nonnull;
13 import org.opendaylight.mdsal.common.api.clustering.CandidateAlreadyRegisteredException;
14 import org.opendaylight.mdsal.common.api.clustering.EntityOwnershipState;
15 import org.opendaylight.mdsal.common.api.clustering.GenericEntityOwnershipService;
16 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
19 * DOM version of {@link GenericEntityOwnershipService}.
21 * @author Thomas Pantelis
24 public interface DOMEntityOwnershipService extends
25 GenericEntityOwnershipService<YangInstanceIdentifier, DOMEntity, DOMEntityOwnershipListener> {
31 DOMEntityOwnershipCandidateRegistration registerCandidate(@Nonnull DOMEntity entity)
32 throws CandidateAlreadyRegisteredException;
38 DOMEntityOwnershipListenerRegistration registerListener(@Nonnull String entityType,
39 @Nonnull DOMEntityOwnershipListener listener);
45 Optional<EntityOwnershipState> getOwnershipState(@Nonnull DOMEntity forEntity);
51 boolean isCandidateRegistered(@Nonnull DOMEntity forEntity);