Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2014-present Open Networking Foundation |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 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 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.cluster; |
tom | b41d1ac | 2014-09-24 01:51:24 -0700 | [diff] [blame] | 17 | |
Jordan Halterman | 28183ee | 2017-10-17 17:29:10 -0700 | [diff] [blame] | 18 | import java.util.Set; |
| 19 | |
| 20 | import org.onlab.packet.IpAddress; |
| 21 | |
tom | b41d1ac | 2014-09-24 01:51:24 -0700 | [diff] [blame] | 22 | /** |
| 23 | * Service for administering the cluster node membership. |
| 24 | */ |
Jordan Halterman | 28183ee | 2017-10-17 17:29:10 -0700 | [diff] [blame] | 25 | public interface ClusterAdminService extends ClusterService { |
| 26 | |
| 27 | /** |
| 28 | * Forms cluster configuration based on the specified set of node |
| 29 | * information. This method resets and restarts the controller |
| 30 | * instance. |
| 31 | * |
| 32 | * @param nodes set of nodes that form the cluster |
Jordan Halterman | 00e92da | 2018-05-22 23:05:52 -0700 | [diff] [blame] | 33 | * @deprecated since 1.14 |
Jordan Halterman | 28183ee | 2017-10-17 17:29:10 -0700 | [diff] [blame] | 34 | */ |
Jordan Halterman | 00e92da | 2018-05-22 23:05:52 -0700 | [diff] [blame] | 35 | @Deprecated |
Jordan Halterman | 28183ee | 2017-10-17 17:29:10 -0700 | [diff] [blame] | 36 | void formCluster(Set<ControllerNode> nodes); |
| 37 | |
| 38 | /** |
| 39 | * Forms cluster configuration based on the specified set of node |
| 40 | * information. This method resets and restarts the controller |
| 41 | * instance. |
| 42 | * |
| 43 | * @param nodes set of nodes that form the cluster |
| 44 | * @param partitionSize number of nodes to compose a partition |
Jordan Halterman | 00e92da | 2018-05-22 23:05:52 -0700 | [diff] [blame] | 45 | * @deprecated since 1.14 |
Jordan Halterman | 28183ee | 2017-10-17 17:29:10 -0700 | [diff] [blame] | 46 | */ |
Jordan Halterman | 00e92da | 2018-05-22 23:05:52 -0700 | [diff] [blame] | 47 | @Deprecated |
Jordan Halterman | 28183ee | 2017-10-17 17:29:10 -0700 | [diff] [blame] | 48 | void formCluster(Set<ControllerNode> nodes, int partitionSize); |
| 49 | |
| 50 | /** |
| 51 | * Adds a new controller node to the cluster. |
| 52 | * |
| 53 | * @param nodeId controller node identifier |
| 54 | * @param ip node IP listen address |
| 55 | * @param tcpPort tcp listen port |
| 56 | * @return newly added node |
Jordan Halterman | 00e92da | 2018-05-22 23:05:52 -0700 | [diff] [blame] | 57 | * @deprecated since 1.14 |
Jordan Halterman | 28183ee | 2017-10-17 17:29:10 -0700 | [diff] [blame] | 58 | */ |
Jordan Halterman | 00e92da | 2018-05-22 23:05:52 -0700 | [diff] [blame] | 59 | @Deprecated |
Jordan Halterman | 28183ee | 2017-10-17 17:29:10 -0700 | [diff] [blame] | 60 | ControllerNode addNode(NodeId nodeId, IpAddress ip, int tcpPort); |
| 61 | |
| 62 | /** |
| 63 | * Removes the specified node from the cluster node list. |
| 64 | * |
| 65 | * @param nodeId controller node identifier |
Jordan Halterman | 00e92da | 2018-05-22 23:05:52 -0700 | [diff] [blame] | 66 | * @deprecated since 1.14 |
Jordan Halterman | 28183ee | 2017-10-17 17:29:10 -0700 | [diff] [blame] | 67 | */ |
Jordan Halterman | 00e92da | 2018-05-22 23:05:52 -0700 | [diff] [blame] | 68 | @Deprecated |
Jordan Halterman | 28183ee | 2017-10-17 17:29:10 -0700 | [diff] [blame] | 69 | void removeNode(NodeId nodeId); |
| 70 | |
| 71 | /** |
| 72 | * Marks the current node as fully started or not. |
| 73 | * |
| 74 | * @param started true indicates all components have been started |
| 75 | */ |
| 76 | void markFullyStarted(boolean started); |
| 77 | |
tom | b41d1ac | 2014-09-24 01:51:24 -0700 | [diff] [blame] | 78 | } |