net.floodlightcontroller.devicemanager.internal
Class DeviceManagerImpl.HAListenerDelegate

java.lang.Object
  extended by net.floodlightcontroller.devicemanager.internal.DeviceManagerImpl.HAListenerDelegate
All Implemented Interfaces:
IHAListener, IListener<HAListenerTypeMarker>
Enclosing class:
DeviceManagerImpl

protected class DeviceManagerImpl.HAListenerDelegate
extends java.lang.Object
implements IHAListener


Nested Class Summary
 
Nested classes/interfaces inherited from interface net.floodlightcontroller.core.IListener
IListener.Command
 
Constructor Summary
protected DeviceManagerImpl.HAListenerDelegate()
           
 
Method Summary
 void controllerNodeIPsChanged(java.util.Map<java.lang.String,java.lang.String> curControllerNodeIPs, java.util.Map<java.lang.String,java.lang.String> addedControllerNodeIPs, java.util.Map<java.lang.String,java.lang.String> removedControllerNodeIPs)
          Gets called when the IP addresses of the controller nodes in the controller cluster change.
 java.lang.String getName()
          The name assigned to this listener
 boolean isCallbackOrderingPostreq(HAListenerTypeMarker type, java.lang.String name)
          Check if the module called name is a callback ordering post-requisite for this module.
 boolean isCallbackOrderingPrereq(HAListenerTypeMarker type, java.lang.String name)
          Check if the module called name is a callback ordering prerequisite for this module.
 void transitionToMaster()
          This notification is fired if the controller's initial role was SLAVE and the controller is now transitioning to MASTER.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeviceManagerImpl.HAListenerDelegate

protected DeviceManagerImpl.HAListenerDelegate()
Method Detail

transitionToMaster

public void transitionToMaster()
Description copied from interface: IHAListener
This notification is fired if the controller's initial role was SLAVE and the controller is now transitioning to MASTER. Modules need to read their initial role in startUp from floodlight provider.

Specified by:
transitionToMaster in interface IHAListener

controllerNodeIPsChanged

public void controllerNodeIPsChanged(java.util.Map<java.lang.String,java.lang.String> curControllerNodeIPs,
                                     java.util.Map<java.lang.String,java.lang.String> addedControllerNodeIPs,
                                     java.util.Map<java.lang.String,java.lang.String> removedControllerNodeIPs)
Description copied from interface: IHAListener
Gets called when the IP addresses of the controller nodes in the controller cluster change. All parameters map controller ID to the controller's IP.

Specified by:
controllerNodeIPsChanged in interface IHAListener
Parameters:
curControllerNodeIPs - The current mapping of controller IDs to IP
addedControllerNodeIPs - These IPs were added since the last update
removedControllerNodeIPs - These IPs were removed since the last update

getName

public java.lang.String getName()
Description copied from interface: IListener
The name assigned to this listener

Specified by:
getName in interface IListener<HAListenerTypeMarker>
Returns:

isCallbackOrderingPrereq

public boolean isCallbackOrderingPrereq(HAListenerTypeMarker type,
                                        java.lang.String name)
Description copied from interface: IListener
Check if the module called name is a callback ordering prerequisite for this module. In other words, if this function returns true for the given name, then this listener will be called after that message listener.

Specified by:
isCallbackOrderingPrereq in interface IListener<HAListenerTypeMarker>
Parameters:
type - the object type to which this applies
name - the name of the module
Returns:
whether name is a prerequisite.

isCallbackOrderingPostreq

public boolean isCallbackOrderingPostreq(HAListenerTypeMarker type,
                                         java.lang.String name)
Description copied from interface: IListener
Check if the module called name is a callback ordering post-requisite for this module. In other words, if this function returns true for the given name, then this listener will be called before that message listener.

Specified by:
isCallbackOrderingPostreq in interface IListener<HAListenerTypeMarker>
Parameters:
type - the object type to which this applies
name - the name of the module
Returns:
whether name is a post-requisite.