tom | e472987 | 2014-09-23 00:37:37 -0700 | [diff] [blame^] | 1 | package org.onlab.onos.cluster; |
| 2 | |
| 3 | import java.util.Set; |
| 4 | |
| 5 | /** |
| 6 | * Manages inventory of controller cluster nodes; not intended for direct use. |
| 7 | */ |
| 8 | public interface ClusterStore { |
| 9 | |
| 10 | /** |
| 11 | * Returns the local controller instance. |
| 12 | * |
| 13 | * @return local controller instance |
| 14 | */ |
| 15 | ControllerNode getLocalNode(); |
| 16 | |
| 17 | /** |
| 18 | * Returns the set of current cluster members. |
| 19 | * |
| 20 | * @return set of cluster members |
| 21 | */ |
| 22 | Set<ControllerNode> getNodes(); |
| 23 | |
| 24 | /** |
| 25 | * Returns the specified controller instance. |
| 26 | * |
| 27 | * @param nodeId controller instance identifier |
| 28 | * @return controller instance |
| 29 | */ |
| 30 | ControllerNode getNode(NodeId nodeId); |
| 31 | |
| 32 | /** |
| 33 | * Returns the availability state of the specified controller instance. |
| 34 | * |
| 35 | * @param nodeId controller instance identifier |
| 36 | * @return availability state |
| 37 | */ |
| 38 | ControllerNode.State getState(NodeId nodeId); |
| 39 | |
| 40 | } |