@Beta public interface EntityOwnershipService extends GenericEntityOwnershipService<InstanceIdentifier<?>,Entity,EntityOwnershipListener>
GenericEntityOwnershipService
.Modifier and Type | Method and Description |
---|---|
Optional<EntityOwnershipState> |
getOwnershipState(Entity forEntity)
Gets the current ownership state information for an entity.
|
boolean |
isCandidateRegistered(Entity forEntity)
Checks if a local candidate is registered for the given entity.
|
EntityOwnershipCandidateRegistration |
registerCandidate(Entity entity)
Registers a candidate for ownership of the given entity.
|
EntityOwnershipListenerRegistration |
registerListener(String entityType,
EntityOwnershipListener listener)
Registers a listener that is interested in ownership changes for entities of the given entity type.
|
EntityOwnershipCandidateRegistration registerCandidate(Entity entity) throws CandidateAlreadyRegisteredException
GenericEntityOwnershipService
The registration is performed asynchronously and any registered entity ownership listener is notified of ownership status changes for the entity.
registerCandidate
in interface GenericEntityOwnershipService<InstanceIdentifier<?>,Entity,EntityOwnershipListener>
entity
- the entity which the Candidate wants to ownCandidateAlreadyRegisteredException
- if the candidate was already registeredEntityOwnershipListenerRegistration registerListener(String entityType, EntityOwnershipListener listener)
GenericEntityOwnershipService
registerListener
in interface GenericEntityOwnershipService<InstanceIdentifier<?>,Entity,EntityOwnershipListener>
entityType
- the type of entities whose ownership status the Listener is interested inlistener
- the listener that is interested in the entitiesOptional<EntityOwnershipState> getOwnershipState(Entity forEntity)
GenericEntityOwnershipService
getOwnershipState
in interface GenericEntityOwnershipService<InstanceIdentifier<?>,Entity,EntityOwnershipListener>
forEntity
- the entity to query.boolean isCandidateRegistered(Entity forEntity)
GenericEntityOwnershipService
isCandidateRegistered
in interface GenericEntityOwnershipService<InstanceIdentifier<?>,Entity,EntityOwnershipListener>
forEntity
- the entity to query.Copyright © 2019 OpenDaylight. All rights reserved.