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
8 package org.opendaylight.genius.itm.cache;
10 import java.util.concurrent.ConcurrentHashMap;
11 import java.util.concurrent.ConcurrentMap;
12 import javax.inject.Singleton;
13 import org.opendaylight.genius.itm.utils.NodeConnectorInfo;
16 public class UnprocessedOFNodeConnectorCache {
18 private final ConcurrentMap<String, NodeConnectorInfo> unprocessedOFNodeConnectorMap = new ConcurrentHashMap<>();
20 public void add(String ofPortName, NodeConnectorInfo nodeConnectorInfo) {
21 unprocessedOFNodeConnectorMap.put(ofPortName, nodeConnectorInfo);
24 public NodeConnectorInfo get(String ofPortName) {
25 return unprocessedOFNodeConnectorMap.get(ofPortName);
28 public NodeConnectorInfo remove(String ofPortName) {
29 return unprocessedOFNodeConnectorMap.remove(ofPortName);
32 public ConcurrentMap<String, NodeConnectorInfo> getAllPresent() {
33 return unprocessedOFNodeConnectorMap;