blob: 925517517af83658338b22956624c91135035b33 [file] [log] [blame]
tom73d6d1e2014-09-17 20:08:01 -07001package org.onlab.onos.cluster;
2
Ayaka Koshibe1d56fe42014-09-19 16:51:58 -07003import org.onlab.packet.IpPrefix;
tom73d6d1e2014-09-17 20:08:01 -07004
5/**
6 * Represents a controller instance as a member in a cluster.
7 */
8public interface ControllerInstance {
9
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 */
29 InstanceId id();
30
31 /**
32 * Returns the IP address of the controller instance.
33 *
34 * @return IP address
35 */
Ayaka Koshibe1d56fe42014-09-19 16:51:58 -070036 IpPrefix ip();
tom73d6d1e2014-09-17 20:08:01 -070037
38}