Class DeviceOwnershipServiceImpl
java.lang.Object
org.opendaylight.openflowplugin.applications.deviceownershipservice.impl.DeviceOwnershipServiceImpl
- All Implemented Interfaces:
AutoCloseable
,org.opendaylight.mdsal.eos.binding.api.EntityOwnershipListener
,DeviceOwnershipService
@Singleton
public final class DeviceOwnershipServiceImpl
extends Object
implements DeviceOwnershipService, org.opendaylight.mdsal.eos.binding.api.EntityOwnershipListener, AutoCloseable
-
Constructor Summary
ConstructorDescriptionDeviceOwnershipServiceImpl
(org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService entityOwnershipService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
isEntityOwned
(String nodeId) Method is used to check if the node is the entity owner of the switch.void
ownershipChanged
(org.opendaylight.mdsal.eos.binding.api.Entity entity, org.opendaylight.mdsal.eos.common.api.EntityOwnershipStateChange change, boolean inJeopardy)
-
Constructor Details
-
DeviceOwnershipServiceImpl
@Inject public DeviceOwnershipServiceImpl(org.opendaylight.mdsal.eos.binding.api.EntityOwnershipService entityOwnershipService)
-
-
Method Details
-
close
@PreDestroy public void close()- Specified by:
close
in interfaceAutoCloseable
-
isEntityOwned
Description copied from interface:DeviceOwnershipService
Method is used to check if the node is the entity owner of the switch.- Specified by:
isEntityOwned
in interfaceDeviceOwnershipService
- Returns:
- true if the node is the owner of the switch , false if either the switch is owned by some other node or if the cluster is in Jeopardy
-
ownershipChanged
public void ownershipChanged(org.opendaylight.mdsal.eos.binding.api.Entity entity, org.opendaylight.mdsal.eos.common.api.EntityOwnershipStateChange change, boolean inJeopardy) - Specified by:
ownershipChanged
in interfaceorg.opendaylight.mdsal.eos.binding.api.EntityOwnershipListener
-