-/**
+/*
* Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.openflowplugin.applications.frsync.impl.clustering;
import com.google.common.util.concurrent.Futures;
/**
* {@link ClusterSingletonService} clusterSingletonServiceRegistration per connected device.
*/
-public class DeviceMastership implements ClusterSingletonService, AutoCloseable {
+public final class DeviceMastership implements ClusterSingletonService, AutoCloseable {
private static final Logger LOG = LoggerFactory.getLogger(DeviceMastership.class);
private final NodeId nodeId;
private final ServiceGroupIdentifier identifier;
final ReconciliationRegistry reconciliationRegistry,
final ClusterSingletonServiceProvider clusterSingletonService) {
this.nodeId = nodeId;
- this.identifier = ServiceGroupIdentifier.create(nodeId.getValue());
+ identifier = ServiceGroupIdentifier.create(nodeId.getValue());
this.reconciliationRegistry = reconciliationRegistry;
- this.deviceMastered = false;
+ deviceMastered = false;
clusterSingletonServiceRegistration = clusterSingletonService.registerClusterSingletonService(this);
}