@Deprecated public interface EntityOwnershipService
The EntityOwnershipService provides the means for a component/application to request ownership for a given Entity on the current cluster member. Entity ownership is always tied to a process and two components on the same process cannot register a candidate for a given Entity.
A component/application may also register interest in the ownership status of an Entity. The listener would be notified whenever the ownership status changes.
Modifier and Type | Method and Description |
---|---|
com.google.common.base.Optional<EntityOwnershipState> |
getOwnershipState(Entity forEntity)
Deprecated.
Gets the current ownership state information for an entity.
|
boolean |
isCandidateRegistered(Entity entity)
Deprecated.
Check if a local candidate is registered for the given entity
|
EntityOwnershipCandidateRegistration |
registerCandidate(Entity entity)
Deprecated.
Registers a candidate for ownership of the given entity.
|
EntityOwnershipListenerRegistration |
registerListener(String entityType,
EntityOwnershipListener listener)
Deprecated.
Registers a listener that is interested in ownership changes for entities of the given entity type.
|
EntityOwnershipCandidateRegistration registerCandidate(@Nonnull Entity entity) throws CandidateAlreadyRegisteredException
The registration is performed asynchronously and any registered EntityOwnershipListener
is
notified of ownership status changes for the entity.
entity
- the entity which the Candidate wants to ownCandidateAlreadyRegisteredException
EntityOwnershipListenerRegistration registerListener(@Nonnull String entityType, @Nonnull EntityOwnershipListener listener)
entityType
- the type of entities whose ownership status the Listener is interested inlistener
- the listener that is interested in the entitiescom.google.common.base.Optional<EntityOwnershipState> getOwnershipState(@Nonnull Entity forEntity)
forEntity
- the entity to query.Copyright © 2019 OpenDaylight. All rights reserved.