2 * Copyright (c) 2017 Cisco Systems. 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.groupbasedpolicy.renderer.vpp.lisp.mappers;
11 import com.google.common.collect.HashMultimap;
12 import com.google.common.collect.SetMultimap;
16 * Created by Shakib Ahmed on 7/10/17.
18 public class HostIdToMetadataInterfaceMapper {
19 private SetMultimap<String, String> hostIdToMetadataInterfaceNameMapper;
21 private static final HostIdToMetadataInterfaceMapper INSTANCE = new HostIdToMetadataInterfaceMapper();
23 private HostIdToMetadataInterfaceMapper() {
24 hostIdToMetadataInterfaceNameMapper = HashMultimap.create();
27 public static HostIdToMetadataInterfaceMapper getInstance() {
31 public boolean isMetadataInterfaceConfigured(String hostId, String metadataInterfaceName) {
32 return hostIdToMetadataInterfaceNameMapper.get(hostId).contains(metadataInterfaceName);
35 public void addMetadataInterfaceInHost(String hostId, String metadataInterfaceName) {
36 hostIdToMetadataInterfaceNameMapper.put(hostId, metadataInterfaceName);