blob: 4792a94a3e9596b506f51af26a44c2bfd4d990d9 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2014-present Open Networking Foundation
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07003 *
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'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.cluster;
tomb41d1ac2014-09-24 01:51:24 -070017
Jordan Halterman28183ee2017-10-17 17:29:10 -070018import java.util.Set;
19
20import org.onlab.packet.IpAddress;
21
tomb41d1ac2014-09-24 01:51:24 -070022/**
23 * Service for administering the cluster node membership.
24 */
Jordan Halterman28183ee2017-10-17 17:29:10 -070025public 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 Halterman00e92da2018-05-22 23:05:52 -070033 * @deprecated since 1.14
Jordan Halterman28183ee2017-10-17 17:29:10 -070034 */
Jordan Halterman00e92da2018-05-22 23:05:52 -070035 @Deprecated
Jordan Halterman28183ee2017-10-17 17:29:10 -070036 void formCluster(Set<ControllerNode> nodes);
37
38 /**
39 * Forms cluster configuration based on the specified set of node
40 * information.&nbsp; 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 Halterman00e92da2018-05-22 23:05:52 -070045 * @deprecated since 1.14
Jordan Halterman28183ee2017-10-17 17:29:10 -070046 */
Jordan Halterman00e92da2018-05-22 23:05:52 -070047 @Deprecated
Jordan Halterman28183ee2017-10-17 17:29:10 -070048 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 Halterman00e92da2018-05-22 23:05:52 -070057 * @deprecated since 1.14
Jordan Halterman28183ee2017-10-17 17:29:10 -070058 */
Jordan Halterman00e92da2018-05-22 23:05:52 -070059 @Deprecated
Jordan Halterman28183ee2017-10-17 17:29:10 -070060 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 Halterman00e92da2018-05-22 23:05:52 -070066 * @deprecated since 1.14
Jordan Halterman28183ee2017-10-17 17:29:10 -070067 */
Jordan Halterman00e92da2018-05-22 23:05:52 -070068 @Deprecated
Jordan Halterman28183ee2017-10-17 17:29:10 -070069 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
tomb41d1ac2014-09-24 01:51:24 -070078}