@MetaInfServices public final class SimpleDOMEntityOwnershipService extends Object implements DOMEntityOwnershipService
DOMEntityOwnershipService operating as an isolated island. It has no awareness of the world outside
of itself.| Constructor and Description |
|---|
SimpleDOMEntityOwnershipService() |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.base.Optional<EntityOwnershipState> |
getOwnershipState(DOMEntity forEntity)
Gets the current ownership state information for an entity.
|
boolean |
isCandidateRegistered(DOMEntity forEntity)
Checks if a local candidate is registered for the given entity.
|
DOMEntityOwnershipCandidateRegistration |
registerCandidate(DOMEntity entity)
Registers a candidate for ownership of the given entity.
|
DOMEntityOwnershipListenerRegistration |
registerListener(String entityType,
DOMEntityOwnershipListener listener)
Registers a listener that is interested in ownership changes for entities of the given entity type.
|
String |
toString() |
public DOMEntityOwnershipCandidateRegistration registerCandidate(DOMEntity entity) throws CandidateAlreadyRegisteredException
GenericEntityOwnershipServiceThe registration is performed asynchronously and any registered entity ownership listener is notified of ownership status changes for the entity.
registerCandidate in interface GenericEntityOwnershipService<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier,DOMEntity,DOMEntityOwnershipListener>registerCandidate in interface DOMEntityOwnershipServiceentity - the entity which the Candidate wants to ownCandidateAlreadyRegisteredException - if the candidate was already registeredpublic DOMEntityOwnershipListenerRegistration registerListener(String entityType, DOMEntityOwnershipListener listener)
GenericEntityOwnershipServiceregisterListener in interface GenericEntityOwnershipService<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier,DOMEntity,DOMEntityOwnershipListener>registerListener in interface DOMEntityOwnershipServiceentityType - the type of entities whose ownership status the Listener is interested inlistener - the listener that is interested in the entitiespublic com.google.common.base.Optional<EntityOwnershipState> getOwnershipState(DOMEntity forEntity)
GenericEntityOwnershipServicegetOwnershipState in interface GenericEntityOwnershipService<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier,DOMEntity,DOMEntityOwnershipListener>getOwnershipState in interface DOMEntityOwnershipServiceforEntity - the entity to query.public boolean isCandidateRegistered(DOMEntity forEntity)
GenericEntityOwnershipServiceisCandidateRegistered in interface GenericEntityOwnershipService<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier,DOMEntity,DOMEntityOwnershipListener>isCandidateRegistered in interface DOMEntityOwnershipServiceforEntity - the entity to query.Copyright © 2019 OpenDaylight. All rights reserved.