Migrate entity ownership to JDT annotations
[mdsal.git] / entityownership / mdsal-eos-binding-api / src / main / java / org / opendaylight / mdsal / eos / binding / api / EntityOwnershipService.java
1 /*
2  * Copyright (c) 2015 Brocade Communications Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.mdsal.eos.binding.api;
9
10 import com.google.common.annotations.Beta;
11 import java.util.Optional;
12 import org.opendaylight.mdsal.eos.common.api.CandidateAlreadyRegisteredException;
13 import org.opendaylight.mdsal.eos.common.api.EntityOwnershipState;
14 import org.opendaylight.mdsal.eos.common.api.GenericEntityOwnershipService;
15 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
16
17 /**
18  * Binding version of {@link GenericEntityOwnershipService}.
19  *
20  * @author Thomas Pantelis
21  */
22 @Beta
23 public interface EntityOwnershipService extends
24         GenericEntityOwnershipService<InstanceIdentifier<?>, Entity, EntityOwnershipListener> {
25
26     @Override
27     EntityOwnershipCandidateRegistration registerCandidate(Entity entity)
28             throws CandidateAlreadyRegisteredException;
29
30     @Override
31     EntityOwnershipListenerRegistration registerListener(String entityType,
32             EntityOwnershipListener listener);
33
34     @Override
35     Optional<EntityOwnershipState> getOwnershipState(Entity forEntity);
36
37     @Override
38     boolean isCandidateRegistered(Entity forEntity);
39 }