2 * Copyright (c) 2016, 2017 Cisco Systems, Inc. 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.lispflowmapping.interfaces.mapcache;
10 import java.util.List;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.inet.binary.types.rev160303.IpAddressBinary;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.XtrId;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.eid.container.Eid;
17 * LISP southbound control protocol specific additions to the map-cache
20 * @author Lorand Jakab
23 public interface ILispMapCache extends IMapCache {
30 * Mapping to be stored
32 * The set of RLOCs from all registrations. Used for merging
34 void addMapping(Eid key, Object value, Set<IpAddressBinary> sourceRlocs);
42 * xTR-ID of the mapping
44 * Mapping to be stored
46 void addMapping(Eid key, XtrId xtrId, Object value);
49 * Retrieves mapping for the provided srcKey, dstKey and a XtrId.
54 * xTR-ID for which look-up to be done
55 * @return Returns the mapping found in the cache
57 Object getMapping(Eid key, XtrId xtrId);
65 * xTR-ID of the mapping to be removed
67 void removeMapping(Eid key, XtrId xtrId);
70 * Retrieve all xTR-ID sub-mappings for an EID. Used for merging logic.
74 * @return The list of Objects which should be mappings
76 List<Object> getAllXtrIdMappings(Eid key);
79 * Batch remove several xTR-ID sub-mappings under a certain key.
81 * <p>This is a performance optimization, since interactive calls to
82 * removeMapping() would result in LPM lookups of the key for each call.
83 * With this method, only one such lookup is performed.</p>
88 * List of xTR-IDs that need to be removed
90 void removeXtrIdMappings(Eid key, List<XtrId> xtrIds);
93 * Returns the parent prefix for given key.
96 * The key for which parent is to be returned.
97 * @return The parent prefix of a specific key.
99 Eid getParentPrefix(Eid key);
102 * Returns the sibling prefix for given key.
105 * The key for which sibling is to be returned.
106 * @return The sibling prefix of a specific key.
108 Eid getSiblingPrefix(Eid key);
111 * Returns the virtual parent sibling prefix for given key.
114 * The key for which virtual parent sibling is to be returned.
115 * @return The virtual parent sibling prefix of a specific key.
117 Eid getVirtualParentSiblingPrefix(Eid key);