tom | 73d6d1e | 2014-09-17 20:08:01 -0700 | [diff] [blame^] | 1 | package org.onlab.onos.cluster; |
| 2 | |
| 3 | import java.util.Set; |
| 4 | |
| 5 | /** |
| 6 | * Service for obtaining information about the individual instances within |
| 7 | * the controller cluster. |
| 8 | */ |
| 9 | public interface ClusterService { |
| 10 | |
| 11 | /** |
| 12 | * Returns the set of current cluster members. |
| 13 | * |
| 14 | * @return set of cluster members |
| 15 | */ |
| 16 | Set<ControllerInstance> getInstances(); |
| 17 | |
| 18 | /** |
| 19 | * Returns the availability state of the specified controller instance. |
| 20 | * |
| 21 | * @return availability state |
| 22 | */ |
| 23 | ControllerInstance.State getState(ControllerInstance instance); |
| 24 | // TODO: determine if this would be better attached to ControllerInstance directly |
| 25 | |
| 26 | |
| 27 | // addListener, removeListener |
| 28 | |
| 29 | } |