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
8 package org.opendaylight.groupbasedpolicy.renderer.vpp.lisp.info.container.states;
10 import java.util.HashMap;
13 * Created by Shakib Ahmed on 7/17/17.
15 public class VrfHolder {
16 HashMap<Long, VrfState> vrfIdToVrfStateMapper;
19 vrfIdToVrfStateMapper = new HashMap<>();
22 public VrfState getVrfState(Long vrfId) {
23 return vrfIdToVrfStateMapper.get(vrfId);
26 public void initializeVrfState(Long vrfId, String routingProtocolName) {
27 vrfIdToVrfStateMapper.put(vrfId, new VrfState(routingProtocolName));
30 public boolean hasVrf(Long vrfId) {
31 return vrfIdToVrfStateMapper.containsKey(vrfId);