2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.connectionmanager;
12 * Enumeration that represents the Connectivity Scheme / Algorithm for South-Bound nodes
13 * towards an Active-Active Clustered Controllers.
15 public enum ConnectionMgmtScheme {
17 * All the nodes are connected with a Single Controller.
18 * The SingleControllerScheme algorithm will determine that one controller to which all
19 * the nodes are connected with.
20 * This is like Active-Standby model from a South-Bound perspective.
22 SINGLE_CONTROLLER("All nodes connected with a Single Controller"),
25 * Any node can be connected with any controller. But with just 1 master controller.
27 ANY_CONTROLLER_ONE_MASTER("Nodes can to connect with any controller in the cluster"),
30 * Simple Round Robin Scheme that will let the nodes connect with each controller in
31 * Active-Active cluster in a round robin fashion.
33 ROUND_ROBIN("Each node is connected with individual Controller in Round-Robin fashion"),
36 * Complex Load Balancing scheme that will let the nodes connect with controller based
37 * on the resource usage in each of the controllers in a cluster.
39 LOAD_BALANCED("Connect nodes to controllers based on the Controller Load"),
42 * Container based scheme will let the nodes connect with controller based
43 * on the container configuration.
45 CONTAINER_BASED("Connect nodes to controllers based on Container they belong to");
47 private ConnectionMgmtScheme(String name) {
53 public String toString() {
57 public static ConnectionMgmtScheme fromString(String pName) {
58 for(ConnectionMgmtScheme p:ConnectionMgmtScheme.values()) {
59 if (p.toString().equals(pName)) {