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 | */ |
tom | 1d416c5 | 2014-09-29 20:55:24 -0700 | [diff] [blame] | 16 | package org.onlab.onos.store.cluster.impl; |
| 17 | |
| 18 | import org.onlab.onos.cluster.DefaultControllerNode; |
tom | 8158314 | 2014-09-30 01:40:29 -0700 | [diff] [blame] | 19 | import org.onlab.onos.cluster.NodeId; |
Pavlin Radoslavov | 444b519 | 2014-10-28 10:45:19 -0700 | [diff] [blame] | 20 | import org.onlab.packet.IpAddress; |
tom | 1d416c5 | 2014-09-29 20:55:24 -0700 | [diff] [blame] | 21 | |
Yuta HIGUCHI | 41f2ec0 | 2014-10-27 09:54:43 -0700 | [diff] [blame] | 22 | // Not used right now |
tom | 1d416c5 | 2014-09-29 20:55:24 -0700 | [diff] [blame] | 23 | /** |
| 24 | * Simple back interface through which connection manager can interact with |
| 25 | * the cluster store. |
| 26 | */ |
| 27 | public interface ClusterNodesDelegate { |
| 28 | |
| 29 | /** |
tom | 8158314 | 2014-09-30 01:40:29 -0700 | [diff] [blame] | 30 | * Notifies about cluster node coming online. |
tom | 1d416c5 | 2014-09-29 20:55:24 -0700 | [diff] [blame] | 31 | * |
tom | 8158314 | 2014-09-30 01:40:29 -0700 | [diff] [blame] | 32 | * @param nodeId newly detected cluster node id |
| 33 | * @param ip node IP listen address |
| 34 | * @param tcpPort node TCP listen port |
| 35 | * @return the controller node |
tom | 1d416c5 | 2014-09-29 20:55:24 -0700 | [diff] [blame] | 36 | */ |
Pavlin Radoslavov | 444b519 | 2014-10-28 10:45:19 -0700 | [diff] [blame] | 37 | DefaultControllerNode nodeDetected(NodeId nodeId, IpAddress ip, |
| 38 | int tcpPort); |
tom | 1d416c5 | 2014-09-29 20:55:24 -0700 | [diff] [blame] | 39 | |
| 40 | /** |
| 41 | * Notifies about cluster node going offline. |
| 42 | * |
tom | 8158314 | 2014-09-30 01:40:29 -0700 | [diff] [blame] | 43 | * @param nodeId identifier of the cluster node that vanished |
tom | 1d416c5 | 2014-09-29 20:55:24 -0700 | [diff] [blame] | 44 | */ |
tom | 8158314 | 2014-09-30 01:40:29 -0700 | [diff] [blame] | 45 | void nodeVanished(NodeId nodeId); |
tom | 1d416c5 | 2014-09-29 20:55:24 -0700 | [diff] [blame] | 46 | |
tom | d33e640 | 2014-09-30 03:14:43 -0700 | [diff] [blame] | 47 | /** |
| 48 | * Notifies about remote request to remove node from cluster. |
| 49 | * |
| 50 | * @param nodeId identifier of the cluster node that was removed |
| 51 | */ |
| 52 | void nodeRemoved(NodeId nodeId); |
| 53 | |
tom | 1d416c5 | 2014-09-29 20:55:24 -0700 | [diff] [blame] | 54 | } |