1 package org.opendaylight.controller.connectionmanager.scheme;
3 import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
4 import org.opendaylight.controller.connectionmanager.ConnectionMgmtScheme;
6 public class SchemeFactory {
7 public static AbstractScheme getScheme(ConnectionMgmtScheme scheme, IClusterGlobalServices clusterServices) {
8 if (scheme == ConnectionMgmtScheme.SINGLE_CONTROLLER) {
9 return SingleControllerScheme.getScheme(clusterServices);
10 } else if (scheme == ConnectionMgmtScheme.ROUND_ROBIN) {
11 return RoundRobinScheme.getScheme(clusterServices);
12 } else if (scheme == ConnectionMgmtScheme.LOAD_BALANCED) {
13 return LoadBalancedScheme.getScheme(clusterServices);
14 } else if (scheme == ConnectionMgmtScheme.ANY_CONTROLLER_ONE_MASTER) {
15 return AnyControllerScheme.getScheme(clusterServices);