Umesh Krishnaswamy | 345ee99 | 2012-12-13 20:29:48 -0800 | [diff] [blame] | 1 | package net.floodlightcontroller.core; |
| 2 | |
| 3 | import java.util.Map; |
| 4 | |
| 5 | import net.floodlightcontroller.core.IFloodlightProviderService.Role; |
| 6 | |
| 7 | public interface IHAListener { |
| 8 | /** |
| 9 | * Gets called when the controller changes role (i.e. Master -> Slave). |
| 10 | * Note that oldRole CAN be null. |
| 11 | * @param oldRole The controller's old role |
| 12 | * @param newRole The controller's new role |
| 13 | */ |
| 14 | public void roleChanged(Role oldRole, Role newRole); |
| 15 | |
| 16 | /** |
| 17 | * Gets called when the IP addresses of the controller nodes in the |
| 18 | * controller cluster change. All parameters map controller ID to |
| 19 | * the controller's IP. |
| 20 | * |
| 21 | * @param curControllerNodeIPs The current mapping of controller IDs to IP |
| 22 | * @param addedControllerNodeIPs These IPs were added since the last update |
| 23 | * @param removedControllerNodeIPs These IPs were removed since the last update |
| 24 | */ |
| 25 | public void controllerNodeIPsChanged( |
| 26 | Map<String, String> curControllerNodeIPs, |
| 27 | Map<String, String> addedControllerNodeIPs, |
| 28 | Map<String, String> removedControllerNodeIPs |
| 29 | ); |
| 30 | } |