Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 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 | */ |
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 | |
Pavlin Radoslavov | 444b519 | 2014-10-28 10:45:19 -0700 | [diff] [blame] | 18 | import org.onlab.packet.IpAddress; |
tom | ee49c37 | 2014-09-26 15:14:50 -0700 | [diff] [blame] | 19 | |
tom | b41d1ac | 2014-09-24 01:51:24 -0700 | [diff] [blame] | 20 | /** |
| 21 | * Service for administering the cluster node membership. |
| 22 | */ |
| 23 | public interface ClusterAdminService { |
| 24 | |
| 25 | /** |
tom | ee49c37 | 2014-09-26 15:14:50 -0700 | [diff] [blame] | 26 | * Adds a new controller node to the cluster. |
| 27 | * |
| 28 | * @param nodeId controller node identifier |
| 29 | * @param ip node IP listen address |
| 30 | * @param tcpPort tcp listen port |
| 31 | * @return newly added node |
| 32 | */ |
Pavlin Radoslavov | 444b519 | 2014-10-28 10:45:19 -0700 | [diff] [blame] | 33 | ControllerNode addNode(NodeId nodeId, IpAddress ip, int tcpPort); |
tom | ee49c37 | 2014-09-26 15:14:50 -0700 | [diff] [blame] | 34 | |
| 35 | /** |
tom | b41d1ac | 2014-09-24 01:51:24 -0700 | [diff] [blame] | 36 | * Removes the specified node from the cluster node list. |
| 37 | * |
| 38 | * @param nodeId controller node identifier |
| 39 | */ |
| 40 | void removeNode(NodeId nodeId); |
| 41 | |
| 42 | } |