Class DeviceMastershipManager
java.lang.Object
org.opendaylight.openflowplugin.applications.frm.impl.DeviceMastershipManager
- All Implemented Interfaces:
AutoCloseable
,EventListener
,org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener<FlowCapableNode>
,org.opendaylight.mdsal.binding.api.DataTreeChangeListener<FlowCapableNode>
,MastershipChangeService
public class DeviceMastershipManager
extends Object
implements org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener<FlowCapableNode>, AutoCloseable, MastershipChangeService
Manager for clustering service registrations of
DeviceMastership
.-
Constructor Summary
ConstructorDescriptionDeviceMastershipManager
(org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider clusterSingletonService, FlowNodeReconciliation reconcliationAgent, org.opendaylight.mdsal.binding.api.DataBroker dataBroker, MastershipChangeServiceManager mastershipChangeServiceManager, org.opendaylight.mdsal.binding.api.RpcProviderService rpcProviderService, FrmReconciliationService reconciliationService) -
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
(@NonNull Collection<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(org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider clusterSingletonService, FlowNodeReconciliation reconcliationAgent, org.opendaylight.mdsal.binding.api.DataBroker dataBroker, MastershipChangeServiceManager mastershipChangeServiceManager, org.opendaylight.mdsal.binding.api.RpcProviderService rpcProviderService, FrmReconciliationService reconciliationService)
-
-
Method Details
-
isDeviceMastered
-
isNodeActive
-
onDataTreeChanged
public void onDataTreeChanged(@NonNull Collection<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
-