2 * Copyright (c) 2020 Ericsson India Global Services Pvt Ltd. 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
9 package org.opendaylight.openflowplugin.applications.frm;
11 import java.util.HashMap;
13 import javax.inject.Inject;
14 import org.opendaylight.openflowplugin.api.openflow.FlowGroupCacheManager;
16 public class ReconciliationJMXService implements ReconciliationJMXServiceMBean {
17 private FlowGroupCacheManager flowGroupCacheManager;
20 public ReconciliationJMXService(final FlowGroupCacheManager floGroupCacheManager) {
21 this.flowGroupCacheManager = floGroupCacheManager;
25 public Map<String, String> acquireReconciliationStates() {
26 Map<String, String> reconciliationStatesMap = new HashMap<>();
27 flowGroupCacheManager.getReconciliationStates().forEach((datapathId, reconciliationState) ->
28 reconciliationStatesMap.put(datapathId, reconciliationState.toString()));
29 return reconciliationStatesMap;