Prevent ConfigPusher from killing its thread
[controller.git] / opendaylight / connectionmanager / implementation / src / main / java / org / opendaylight / controller / connectionmanager / scheme / SchemeFactory.java
1 package org.opendaylight.controller.connectionmanager.scheme;
2
3 import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
4 import org.opendaylight.controller.connectionmanager.ConnectionMgmtScheme;
5
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);
16         }
17         return null;
18     }
19 }