blob: dbe5f71c781ef1ba323420edb6bb47ee641944cb [file] [log] [blame]
Madan Jampaniafeebbd2015-05-19 15:26:01 -07001package org.onosproject.cluster;
2
3import java.util.Set;
4
5/**
6 * Service for obtaining the static definition of a controller cluster.
7 */
8public 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}