@Deprecated public class LegacyEntityOwnershipServiceAdapter extends Object implements EntityOwnershipService, AutoCloseable
Constructor and Description |
---|
LegacyEntityOwnershipServiceAdapter(org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipService domService)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
|
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.
|
public LegacyEntityOwnershipServiceAdapter(@Nonnull org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipService domService)
public EntityOwnershipCandidateRegistration registerCandidate(Entity entity) throws CandidateAlreadyRegisteredException
EntityOwnershipService
The registration is performed asynchronously and any registered EntityOwnershipListener
is
notified of ownership status changes for the entity.
registerCandidate
in interface EntityOwnershipService
entity
- the entity which the Candidate wants to ownCandidateAlreadyRegisteredException
public EntityOwnershipListenerRegistration registerListener(String entityType, EntityOwnershipListener listener)
EntityOwnershipService
registerListener
in interface EntityOwnershipService
entityType
- 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(Entity forEntity)
EntityOwnershipService
getOwnershipState
in interface EntityOwnershipService
forEntity
- the entity to query.public boolean isCandidateRegistered(Entity entity)
EntityOwnershipService
isCandidateRegistered
in interface EntityOwnershipService
public void close()
close
in interface AutoCloseable
Copyright © 2019 OpenDaylight. All rights reserved.