1 package org.opendaylight.controller.connectionmanager.scheme;
3 import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
4 import org.opendaylight.controller.connectionmanager.ConnectionMgmtScheme;
5 import org.opendaylight.controller.sal.core.Node;
7 class SingleControllerScheme extends AbstractScheme {
9 private static AbstractScheme myScheme= null;
11 protected SingleControllerScheme(IClusterGlobalServices clusterServices) {
12 super(clusterServices, ConnectionMgmtScheme.SINGLE_CONTROLLER);
15 public static AbstractScheme getScheme(IClusterGlobalServices clusterServices) {
16 if (myScheme == null) {
17 myScheme = new SingleControllerScheme(clusterServices);
22 @SuppressWarnings("deprecation")
24 public boolean isConnectionAllowedInternal(Node node) {
25 if (nodeConnections == null) return true;
26 // Lets make it simple. The Cluster Coordinator is the master
27 if (clusterServices.amICoordinator()) return true;