Class DeviceMastershipManager
java.lang.Object
org.opendaylight.openflowplugin.applications.frm.impl.DeviceMastershipManager
- All Implemented Interfaces:
AutoCloseable
,org.opendaylight.mdsal.binding.api.DataTreeChangeListener<FlowCapableNode>
,MastershipChangeService
public class DeviceMastershipManager
extends Object
implements org.opendaylight.mdsal.binding.api.DataTreeChangeListener<FlowCapableNode>, AutoCloseable, MastershipChangeService
Manager for clustering service registrations of
DeviceMastership
.-
Constructor Summary
ConstructorDescriptionDeviceMastershipManager
(FlowNodeReconciliation reconcliationAgent, org.opendaylight.mdsal.binding.api.DataBroker dataBroker, MastershipChangeServiceManager mastershipChangeServiceManager, org.opendaylight.mdsal.binding.api.RpcProviderService rpcProviderService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> identifier, FlowCapableNode add, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> nodeIdent) void
close()
boolean
isDeviceMastered
(NodeId nodeId) boolean
isNodeActive
(NodeId nodeId) void
onBecomeOwner
(@NonNull DeviceInfo deviceInfo) Event when device is ready as a master.void
onDataTreeChanged
(List<org.opendaylight.mdsal.binding.api.DataTreeModification<FlowCapableNode>> changes) void
onLoseOwnership
(@NonNull DeviceInfo deviceInfo) Event when device disconnected or become slave.void
remove
(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> identifier, FlowCapableNode del, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> nodeIdent) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opendaylight.mdsal.binding.api.DataTreeChangeListener
onInitialData
-
Constructor Details
-
DeviceMastershipManager
public DeviceMastershipManager(FlowNodeReconciliation reconcliationAgent, org.opendaylight.mdsal.binding.api.DataBroker dataBroker, MastershipChangeServiceManager mastershipChangeServiceManager, org.opendaylight.mdsal.binding.api.RpcProviderService rpcProviderService)
-
-
Method Details
-
isDeviceMastered
-
isNodeActive
-
onDataTreeChanged
public void onDataTreeChanged(List<org.opendaylight.mdsal.binding.api.DataTreeModification<FlowCapableNode>> changes) - Specified by:
onDataTreeChanged
in interfaceorg.opendaylight.mdsal.binding.api.DataTreeChangeListener<FlowCapableNode>
-
remove
public void remove(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> identifier, FlowCapableNode del, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> nodeIdent) -
add
public void add(org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> identifier, FlowCapableNode add, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<FlowCapableNode> nodeIdent) -
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
onBecomeOwner
Description copied from interface:MastershipChangeService
Event when device is ready as a master. This event is evoked byOwnershipChangeListener.becomeMaster(DeviceInfo)
- Specified by:
onBecomeOwner
in interfaceMastershipChangeService
- Parameters:
deviceInfo
- connected switch identification
-
onLoseOwnership
Description copied from interface:MastershipChangeService
Event when device disconnected or become slave. This event is evoked byOwnershipChangeListener.becomeSlaveOrDisconnect(DeviceInfo)
- Specified by:
onLoseOwnership
in interfaceMastershipChangeService
- Parameters:
deviceInfo
- connected switch identification
-