public class SimpleMapCache extends Object implements ILispMapCache
| Constructor and Description |
|---|
SimpleMapCache(ILispDAO dao) |
| Modifier and Type | Method and Description |
|---|---|
void |
addData(Eid eid,
String subKey,
Object data)
Add data for key.
|
void |
addMapping(Eid key,
Object value)
Add mapping.
|
void |
addMapping(Eid key,
Object value,
Set<IpAddressBinary> sourceRlocs)
Add mapping.
|
void |
addMapping(Eid key,
XtrId xtrId,
Object value)
Add mapping.
|
List<Object> |
getAllXtrIdMappings(Eid eid)
Retrieve all xTR-ID sub-mappings for an EID.
|
Eid |
getCoveringLessSpecific(Eid eid)
Look up the covering prefix for the argument, but exclude the argument itself, so the result is always less
specific than the lookup key.
|
Object |
getData(Eid eid,
String subKey)
Generic retrieval of data.
|
Object |
getMapping(Eid srcEid,
Eid dstEid)
Retrieves mapping for the provided srcKey and dstKey.
|
Object |
getMapping(Eid eid,
XtrId xtrId)
Retrieves mapping for the provided srcKey, dstKey and a XtrId.
|
Eid |
getParentPrefix(Eid eid)
Returns the parent prefix for given key.
|
Eid |
getSiblingPrefix(Eid eid)
Returns the sibling prefix for given key.
|
Set<Eid> |
getSubtree(Eid eid)
Retrieves the subtree of a prefix.
|
Eid |
getVirtualParentSiblingPrefix(Eid eid)
Returns the virtual parent sibling prefix for given key.
|
Eid |
getWidestNegativeMapping(Eid eid)
Retrieves widest negative prefix.
|
String |
prettyPrintMappings()
Print mappings in cache in a human friendly format.
|
String |
printMappings()
Print mappings in cache.
|
void |
removeData(Eid eid,
String subKey)
Generic removal of data.
|
void |
removeMapping(Eid eid)
Remove mapping.
|
void |
removeMapping(Eid eid,
XtrId xtrId)
Remove mapping.
|
void |
removeXtrIdMappings(Eid eid,
List<XtrId> xtrIds)
Batch remove several xTR-ID sub-mappings under a certain key.
|
public SimpleMapCache(ILispDAO dao)
public void addMapping(Eid key, Object value)
IMapCacheaddMapping in interface IMapCachekey - Key of the mappingvalue - Value to be storedpublic void addMapping(Eid key, Object value, Set<IpAddressBinary> sourceRlocs)
ILispMapCacheaddMapping in interface ILispMapCachekey - Key of the mappingvalue - Mapping to be storedsourceRlocs - The set of RLOCs from all registrations. Used for mergingpublic void addMapping(Eid key, XtrId xtrId, Object value)
ILispMapCacheaddMapping in interface ILispMapCachekey - Key of the mappingxtrId - xTR-ID of the mappingvalue - Mapping to be storedpublic Object getMapping(Eid srcEid, Eid dstEid)
IMapCachegetMapping in interface IMapCachesrcEid - Source Key to be looked updstEid - Destination Key to be looked uppublic Object getMapping(Eid eid, XtrId xtrId)
ILispMapCachegetMapping in interface ILispMapCacheeid - Key to be looked upxtrId - xTR-ID for which look-up to be donepublic List<Object> getAllXtrIdMappings(Eid eid)
ILispMapCachegetAllXtrIdMappings in interface ILispMapCacheeid - Key to be looked uppublic Eid getWidestNegativeMapping(Eid eid)
IMapCachegetWidestNegativeMapping in interface IMapCacheeid - Source Key to be looked uppublic Eid getCoveringLessSpecific(Eid eid)
ILispMapCachegetCoveringLessSpecific in interface ILispMapCacheeid - The eid prefix, IPv4 or IPv6, to be looked up. Key must be normalized.public Eid getParentPrefix(Eid eid)
ILispMapCachegetParentPrefix in interface ILispMapCacheeid - The key for which parent is to be returned.public Eid getSiblingPrefix(Eid eid)
ILispMapCachegetSiblingPrefix in interface ILispMapCacheeid - The key for which sibling is to be returned.public Eid getVirtualParentSiblingPrefix(Eid eid)
ILispMapCachegetVirtualParentSiblingPrefix in interface ILispMapCacheeid - The key for which virtual parent sibling is to be returned.public Set<Eid> getSubtree(Eid eid)
IMapCachegetSubtree in interface IMapCacheeid - Key to be looked uppublic void removeMapping(Eid eid)
IMapCacheremoveMapping in interface IMapCacheeid - Key to be removedpublic void removeMapping(Eid eid, XtrId xtrId)
ILispMapCacheremoveMapping in interface ILispMapCacheeid - Key to be removedxtrId - xTR-ID of the mapping to be removedpublic void removeXtrIdMappings(Eid eid, List<XtrId> xtrIds)
ILispMapCacheThis is a performance optimization, since interactive calls to removeMapping() would result in LPM lookups of the key for each call. With this method, only one such lookup is performed.
removeXtrIdMappings in interface ILispMapCacheeid - Key to be looked upxtrIds - List of xTR-IDs that need to be removedpublic void addData(Eid eid, String subKey, Object data)
IMapCachepublic Object getData(Eid eid, String subKey)
IMapCachepublic void removeData(Eid eid, String subKey)
IMapCacheremoveData in interface IMapCacheeid - The key of the data to be removedsubKey - The subKey of the data to be removedpublic String printMappings()
IMapCacheprintMappings in interface IMapCachepublic String prettyPrintMappings()
IMapCacheprettyPrintMappings in interface IMapCacheCopyright © 2019 OpenDaylight. All rights reserved.