blob: 00e334685a1c8e3ac01f9fbb5f8839b056183307 [file] [log] [blame]
tom73d6d1e2014-09-17 20:08:01 -07001package org.onlab.onos.cluster;
2
Pavlin Radoslavov444b5192014-10-28 10:45:19 -07003import org.onlab.packet.IpAddress;
tom73d6d1e2014-09-17 20:08:01 -07004
5/**
6 * Represents a controller instance as a member in a cluster.
7 */
tome4729872014-09-23 00:37:37 -07008public interface ControllerNode {
tom73d6d1e2014-09-17 20:08:01 -07009
10 /** Represents the operational state of the instance. */
11 public enum State {
12 /**
13 * Signifies that the instance is active and operating normally.
14 */
15 ACTIVE,
16
17 /**
18 * Signifies that the instance is inactive, which means either down or
19 * up, but not operational.
20 */
21 INACTIVE
22 }
23
24 /**
25 * Returns the instance identifier.
26 *
27 * @return instance identifier
28 */
tome4729872014-09-23 00:37:37 -070029 NodeId id();
tom73d6d1e2014-09-17 20:08:01 -070030
31 /**
32 * Returns the IP address of the controller instance.
33 *
34 * @return IP address
35 */
Pavlin Radoslavov444b5192014-10-28 10:45:19 -070036 IpAddress ip();
tom73d6d1e2014-09-17 20:08:01 -070037
tomee49c372014-09-26 15:14:50 -070038
39 /**
40 * Returns the TCP port on which the node listens for connections.
41 *
42 * @return TCP port
43 */
44 int tcpPort();
45
tom73d6d1e2014-09-17 20:08:01 -070046}