public class MappingSystem extends Object implements IMappingSystem
Constructor and Description |
---|
MappingSystem(ILispDAO dao,
boolean iterateMask,
org.opendaylight.controller.md.sal.binding.api.NotificationPublishService nps,
boolean mappingMerge) |
Modifier and Type | Method and Description |
---|---|
void |
addAuthenticationKey(Eid key,
MappingAuthkey authKey)
Add authentication key.
|
void |
addData(MappingOrigin origin,
Eid key,
String subKey,
Object data)
Add data for key.
|
void |
addMapping(MappingOrigin origin,
Eid key,
MappingData mappingData)
Add mapping.
|
MappingData |
addNegativeMapping(Eid key)
Generate and add a negative mapping entry originated from the southbound, and return the generated mapping.
|
void |
cleanCaches() |
void |
cleanSBMappings() |
void |
destroy() |
MappingAuthkey |
getAuthenticationKey(Eid key)
Retrieve authentication key.
|
Object |
getData(MappingOrigin origin,
Eid key,
String subKey)
Generic retrieval of data.
|
MappingData |
getMapping(Eid dst)
Retrieves mapping for the provided dst key.
|
MappingData |
getMapping(Eid src,
Eid dst)
Retrieves mapping for the provided src and dst key.
|
MappingData |
getMapping(Eid src,
Eid dst,
XtrId xtrId)
Retrieves mapping for the provided dst key for a particular xtr id.
|
MappingData |
getMapping(MappingOrigin origin,
Eid key)
Retrieves mapping from table for provided key.
|
Eid |
getParentPrefix(Eid key)
Returns the parent prefix for given key.
|
Set<Subscriber> |
getSubscribers(Eid address)
Retrieves the subscribers for an EID.
|
Set<Eid> |
getSubtree(MappingOrigin origin,
Eid key)
Retrieves the subtree of a maskable prefix from the given map-cache.
|
Eid |
getWidestNegativePrefix(Eid key)
Retrieves widest negative prefix from table for provided key.
|
MappingData |
handleSbExpiredMapping(Eid key,
XtrId xtrId,
MappingData mappingData) |
void |
initialize() |
boolean |
isMaster()
Get cluster master status.
|
void |
notifyChange(Eid eid,
MappingRecord mapping,
MappingChange mappingChange) |
String |
prettyPrintKeys()
Print keys in cache in a human friendly format.
|
String |
prettyPrintMappings()
Print mappings in cache in a human friendly format.
|
String |
printKeys()
Print all authentication keys.
|
String |
printMappings()
Print all mappings.
|
void |
refreshMappingRegistration(Eid key,
XtrId xtrId,
Long timestamp)
Refresh southbound mapping registration timestamp.
|
void |
removeAuthenticationKey(Eid key)
Remove authentication key.
|
void |
removeData(MappingOrigin origin,
Eid key,
String subKey)
Generic removal of data.
|
void |
removeMapping(MappingOrigin origin,
Eid key)
Remove mapping.
|
void |
setDataStoreBackEnd(DataStoreBackEnd dataStoreBackEnd) |
void |
setIsMaster(boolean isMaster)
Set cluster master status.
|
void |
setIterateMask(boolean iterate)
Sets iterateMask.
|
void |
setMappingMerge(boolean mappingMerge)
Configure merge policy.
|
void |
subscribe(Subscriber subscriber,
Eid subscribedEid)
Subscribe a Subscriber to receive updates about mapping changes for an EID.
|
void |
updateMapping(MappingOrigin origin,
Eid key,
MappingData mappingData)
Update mapping.
|
public MappingSystem(ILispDAO dao, boolean iterateMask, org.opendaylight.controller.md.sal.binding.api.NotificationPublishService nps, boolean mappingMerge)
public void setDataStoreBackEnd(DataStoreBackEnd dataStoreBackEnd)
public void setMappingMerge(boolean mappingMerge)
IMappingSystem
setMappingMerge
in interface IMappingSystem
mappingMerge
- Value to configurepublic void setIterateMask(boolean iterate)
IMappingSystem
setIterateMask
in interface IMappingSystem
iterate
- Value to configurepublic void initialize()
public void updateMapping(MappingOrigin origin, Eid key, MappingData mappingData)
IMappingSystem
updateMapping
in interface IMappingSystem
origin
- Table where mapping should be addedkey
- Key of the mappingmappingData
- Mapping to be storedpublic void addMapping(MappingOrigin origin, Eid key, MappingData mappingData)
IMappingSystem
addMapping
in interface IMappingSystem
origin
- Table where mapping should be addedkey
- Key of the mappingmappingData
- Mapping to be storedpublic MappingData addNegativeMapping(Eid key)
IMappingSystem
addNegativeMapping
in interface IMappingSystem
key
- Key of the mappingpublic void refreshMappingRegistration(Eid key, XtrId xtrId, Long timestamp)
IMappingSystem
refreshMappingRegistration
in interface IMappingSystem
key
- The EID whose registration must be refreshedxtrId
- xTR-ID of the mapping to be refreshedtimestamp
- New timestamp for the mappingpublic MappingData getMapping(Eid src, Eid dst)
IMappingSystem
getMapping
in interface IMappingSystem
src
- Source Key to be looked updst
- Destination Key to be looked uppublic MappingData getMapping(Eid dst)
IMappingSystem
getMapping
in interface IMappingSystem
dst
- Destination Key to be looked uppublic MappingData getMapping(Eid src, Eid dst, XtrId xtrId)
IMappingSystem
getMapping
in interface IMappingSystem
src
- Source Key to be looked up.dst
- Destination Key to be looked up.xtrId
- Xtr Id for which this look to be done. If null, this method works like
regular getMapping(src, dst)public MappingData getMapping(MappingOrigin origin, Eid key)
IMappingSystem
getMapping
in interface IMappingSystem
origin
- Table where mapping should be looked upkey
- Key to be looked uppublic MappingData handleSbExpiredMapping(Eid key, XtrId xtrId, MappingData mappingData)
public Eid getWidestNegativePrefix(Eid key)
IMappingSystem
getWidestNegativePrefix
in interface IMappingSystem
key
- Key to be looked uppublic Set<Eid> getSubtree(MappingOrigin origin, Eid key)
IMappingSystem
getSubtree
in interface IMappingSystem
origin
- Table where the key should be looked upkey
- Key to be looked uppublic void removeMapping(MappingOrigin origin, Eid key)
IMappingSystem
removeMapping
in interface IMappingSystem
origin
- Table for mapping that should be removedkey
- Key to be removedpublic void notifyChange(Eid eid, MappingRecord mapping, MappingChange mappingChange)
public void subscribe(Subscriber subscriber, Eid subscribedEid)
IMappingSystem
subscribe
in interface IMappingSystem
subscriber
- The Subscriber object with information about the subscribersubscribedEid
- The EID for which the subscriber will receive updatespublic Set<Subscriber> getSubscribers(Eid address)
IMappingSystem
getSubscribers
in interface IMappingSystem
address
- The EID to be looked uppublic void addAuthenticationKey(Eid key, MappingAuthkey authKey)
IMappingSystem
addAuthenticationKey
in interface IMappingSystem
key
- The key for which the authentication key is addedauthKey
- The authentication keypublic MappingAuthkey getAuthenticationKey(Eid key)
IMappingSystem
getAuthenticationKey
in interface IMappingSystem
key
- The key for which the authentication key is being looked up.public void removeAuthenticationKey(Eid key)
IMappingSystem
removeAuthenticationKey
in interface IMappingSystem
key
- Key for which the authentication key should be removed.public void addData(MappingOrigin origin, Eid key, String subKey, Object data)
IMappingSystem
addData
in interface IMappingSystem
origin
- Table for data that should be addedkey
- The key for which data is insertedsubKey
- The subKey where data should be inserteddata
- The data to be storedpublic Object getData(MappingOrigin origin, Eid key, String subKey)
IMappingSystem
getData
in interface IMappingSystem
origin
- Table from where data should be retrievedkey
- The key where the data is storedsubKey
- The subKey where data is storedpublic void removeData(MappingOrigin origin, Eid key, String subKey)
IMappingSystem
removeData
in interface IMappingSystem
origin
- Table from where data should be removedkey
- The key of the data to be removedsubKey
- The subKey of the data to be removedpublic Eid getParentPrefix(Eid key)
IMappingSystem
getParentPrefix
in interface IMappingSystem
key
- The key which parent is to be returned.public void destroy()
public String printMappings()
IMappingSystem
printMappings
in interface IMappingSystem
public String prettyPrintMappings()
IMappingSystem
prettyPrintMappings
in interface IMappingSystem
public String printKeys()
IMappingSystem
printKeys
in interface IMappingSystem
public String prettyPrintKeys()
IMappingSystem
prettyPrintKeys
in interface IMappingSystem
public void cleanCaches()
public void cleanSBMappings()
public void setIsMaster(boolean isMaster)
IMappingSystem
setIsMaster
in interface IMappingSystem
isMaster
- is|isn't masterpublic boolean isMaster()
IMappingSystem
isMaster
in interface IMappingSystem
Copyright © 2019 OpenDaylight. All rights reserved.