tom | ca90c46 | 2014-09-22 11:40:58 -0700 | [diff] [blame^] | 1 | package org.onlab.onos.cluster; |
| 2 | |
| 3 | /** |
| 4 | * Service responsible for determining the controller instance mastership of |
| 5 | * a device in a clustered environment. This is the central authority for |
| 6 | * determining mastership, but is not responsible for actually applying it |
| 7 | * to the devices; this falls on the device service. |
| 8 | */ |
| 9 | public interface MastershipService { |
| 10 | |
| 11 | // InstanceId getMasterFor(DeviceId deviceId) |
| 12 | // Set<DeviceId> getDevicesOf(InstanceId instanceId); |
| 13 | |
| 14 | // MastershipRole requestRoleFor(DeviceId deviceId); |
| 15 | |
| 16 | // addListener/removeLister(MastershipListener listener); |
| 17 | // types of events would be MASTER_CHANGED (subject ==> deviceId; master ==> instanceId) |
| 18 | |
| 19 | } |