Yuta HIGUCHI | ab9dc7b | 2014-08-26 22:53:13 -0700 | [diff] [blame] | 1 | package net.onrc.onos.core.topology; |
| 2 | |
| 3 | import net.onrc.onos.core.util.Dpid; |
| 4 | import net.onrc.onos.core.util.OnosInstanceId; |
| 5 | |
| 6 | // TODO probably "Base" prefix is not required |
| 7 | /** |
| 8 | * Interface to access switch mastership information in the network view. |
| 9 | */ |
| 10 | public interface BaseMastership { |
| 11 | |
| 12 | /** |
| 13 | * Gets the master instance ID for a switch. |
| 14 | * |
| 15 | * @param dpid switch dpid |
| 16 | * @return master instance ID or null if there is no master |
| 17 | */ |
| 18 | public OnosInstanceId getSwitchMaster(Dpid dpid); |
| 19 | |
| 20 | // We may need something like below in the future |
| 21 | // public List<ImmutablePair<OnosInstanceId, Role>> getSwitchMasterCandidates(Dpid dpid); |
| 22 | } |