blob: a909534787bb8780fb0a7ae208d816b6ae37371c [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
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 */
tom1d416c52014-09-29 20:55:24 -070016package org.onlab.onos.store.cluster.impl;
17
18import org.onlab.onos.cluster.DefaultControllerNode;
tom81583142014-09-30 01:40:29 -070019import org.onlab.onos.cluster.NodeId;
Pavlin Radoslavov444b5192014-10-28 10:45:19 -070020import org.onlab.packet.IpAddress;
tom1d416c52014-09-29 20:55:24 -070021
Yuta HIGUCHI41f2ec02014-10-27 09:54:43 -070022// Not used right now
tom1d416c52014-09-29 20:55:24 -070023/**
24 * Simple back interface through which connection manager can interact with
25 * the cluster store.
26 */
27public interface ClusterNodesDelegate {
28
29 /**
tom81583142014-09-30 01:40:29 -070030 * Notifies about cluster node coming online.
tom1d416c52014-09-29 20:55:24 -070031 *
tom81583142014-09-30 01:40:29 -070032 * @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
tom1d416c52014-09-29 20:55:24 -070036 */
Pavlin Radoslavov444b5192014-10-28 10:45:19 -070037 DefaultControllerNode nodeDetected(NodeId nodeId, IpAddress ip,
38 int tcpPort);
tom1d416c52014-09-29 20:55:24 -070039
40 /**
41 * Notifies about cluster node going offline.
42 *
tom81583142014-09-30 01:40:29 -070043 * @param nodeId identifier of the cluster node that vanished
tom1d416c52014-09-29 20:55:24 -070044 */
tom81583142014-09-30 01:40:29 -070045 void nodeVanished(NodeId nodeId);
tom1d416c52014-09-29 20:55:24 -070046
tomd33e6402014-09-30 03:14:43 -070047 /**
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
tom1d416c52014-09-29 20:55:24 -070054}