2 * Copyright (c) 2014 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
8 package org.opendaylight.controller.connectionmanager.scheme;
10 import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
11 import org.opendaylight.controller.connectionmanager.ConnectionMgmtScheme;
12 import org.opendaylight.controller.sal.core.Node;
14 class SingleControllerScheme extends AbstractScheme {
16 private static AbstractScheme myScheme = null;
18 protected SingleControllerScheme(IClusterGlobalServices clusterServices) {
19 super(clusterServices, ConnectionMgmtScheme.SINGLE_CONTROLLER);
22 public static AbstractScheme getScheme(IClusterGlobalServices clusterServices) {
23 if (myScheme == null) {
24 myScheme = new SingleControllerScheme(clusterServices);
30 public boolean isConnectionAllowedInternal(Node node) {
31 // Lets make it simple. The Cluster Coordinator is the master
32 return clusterServices.amICoordinator();