Madan Jampani | afeebbd | 2015-05-19 15:26:01 -0700 | [diff] [blame] | 1 | package org.onosproject.cluster; |
| 2 | |
| 3 | import java.util.Set; |
| 4 | |
| 5 | /** |
| 6 | * Service for obtaining the static definition of a controller cluster. |
| 7 | */ |
| 8 | public interface ClusterDefinitionService { |
| 9 | |
| 10 | /** |
| 11 | * Returns the local controller node. |
| 12 | * @return local controller node |
| 13 | */ |
| 14 | ControllerNode localNode(); |
| 15 | |
| 16 | /** |
| 17 | * Returns the set of seed nodes that should be used for discovering other members |
| 18 | * of the cluster. |
| 19 | * @return set of seed controller nodes |
| 20 | */ |
| 21 | Set<ControllerNode> seedNodes(); |
| 22 | |
| 23 | /** |
| 24 | * Forms cluster configuration based on the specified set of node |
| 25 | * information. Assumes subsequent restart for the new configuration to |
| 26 | * take hold. |
| 27 | * |
| 28 | * @param nodes set of nodes that form the cluster |
| 29 | * @param ipPrefix IP address prefix, e.g. 10.0.1.* |
| 30 | */ |
| 31 | void formCluster(Set<ControllerNode> nodes, String ipPrefix); |
| 32 | } |