Merge "L2 Gw create changes related to ITM Tunnels creation in neutronvpn module"
[vpnservice.git] / interfacemgr / interfacemgr-impl / src / main / java / org / opendaylight / vpnservice / interfacemgr / pmcounters / CounterForOFPortDuration.java
1 /*
2  * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.vpnservice.interfacemgr.pmcounters;
9
10 import java.util.HashMap;
11 import java.util.Map;
12
13 public class CounterForOFPortDuration implements CounterForOFPortDurationMBean{
14
15     Map<String, Integer> counterCache = new HashMap<String, Integer>();
16     public static Map counterMap = new HashMap<String,String>();
17     public void invokePMManagedObjects(Map<String, Integer> map) {
18         setCounterDetails(map);
19     }
20
21     public Map<String, Integer> getCounterDetails() {
22         return counterCache;
23     }
24
25     public synchronized void setCounterDetails(Map<String, Integer> map) {
26        counterCache = map;
27     }
28
29     public Map<String, String> retrieveCounterMap(){
30         counterMap = (HashMap) counterCache;
31         return counterMap;
32     }
33
34 }