Thomas Vachuska | 58de416 | 2015-09-10 16:15:33 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Open Networking Laboratory |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
Madan Jampani | afeebbd | 2015-05-19 15:26:01 -0700 | [diff] [blame] | 16 | package org.onosproject.cluster; |
| 17 | |
| 18 | import java.util.Set; |
| 19 | |
| 20 | /** |
| 21 | * Service for obtaining the static definition of a controller cluster. |
| 22 | */ |
| 23 | public interface ClusterDefinitionService { |
| 24 | |
| 25 | /** |
| 26 | * Returns the local controller node. |
| 27 | * @return local controller node |
| 28 | */ |
| 29 | ControllerNode localNode(); |
| 30 | |
| 31 | /** |
| 32 | * Returns the set of seed nodes that should be used for discovering other members |
| 33 | * of the cluster. |
| 34 | * @return set of seed controller nodes |
| 35 | */ |
| 36 | Set<ControllerNode> seedNodes(); |
| 37 | |
| 38 | /** |
| 39 | * Forms cluster configuration based on the specified set of node |
| 40 | * information. Assumes subsequent restart for the new configuration to |
| 41 | * take hold. |
| 42 | * |
| 43 | * @param nodes set of nodes that form the cluster |
| 44 | * @param ipPrefix IP address prefix, e.g. 10.0.1.* |
| 45 | */ |
| 46 | void formCluster(Set<ControllerNode> nodes, String ipPrefix); |
| 47 | } |