1 package org.opendaylight.controller.connectionmanager.scheme;
3 import java.net.InetAddress;
6 * Configuration object that can be used to prioritize or add weight to a given controller.
7 * This can be potentially used by the Connection management scheme algorithms.
9 * This is currently not used.
12 public class ControllerConfig {
13 private InetAddress controllerId;
17 public ControllerConfig(InetAddress controllerId, int priority, int weight) {
18 this.controllerId = controllerId;
19 this.priority = priority;
23 public InetAddress getControllerId() {
26 public int getPriority() {
29 public int getWeight() {
34 public int hashCode() {
37 result = prime * result
38 + ((controllerId == null) ? 0 : controllerId.hashCode());
42 public boolean equals(Object obj) {
47 if (getClass() != obj.getClass())
49 ControllerConfig other = (ControllerConfig) obj;
50 if (controllerId == null) {
51 if (other.controllerId != null)
53 } else if (!controllerId.equals(other.controllerId))
58 public String toString() {
59 return "ControllerConfig [controllerId=" + controllerId + ", priority="
60 + priority + ", weight=" + weight + "]";