public interface IMappingService
Modifier and Type | Interface and Description |
---|---|
static class |
IMappingService.LookupPolicy |
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)
Generic addition of data.
|
void |
addMapping(MappingOrigin origin,
Eid key,
SiteId siteId,
MappingData mapping)
Add mapping.
|
MappingData |
addNegativeMapping(Eid key)
Generate and add a negative mapping entry originated from the southbound, and return the generated mapping.
|
void |
cleanCachedMappings()
Cleans all cached mappings.Used for testing.
|
MappingAuthkey |
getAuthenticationKey(Eid key)
Retrieve authentication key.
|
Object |
getData(MappingOrigin origin,
Eid key,
String subKey)
Generic retrieval of data.
|
MappingData |
getMapping(Eid key)
Retrieves mapping for given key.The lookup policy for the key is defined in the Mapping
System.
|
MappingData |
getMapping(Eid srcKey,
Eid dstKey)
Retrieves mapping with a Source/Dest policy.
|
MappingData |
getMapping(MappingOrigin origin,
Eid key)
Retrieves mapping with given origin for the provided key.
|
Eid |
getParentPrefix(Eid key)
Returns the parent prefix for given key.
|
Set<Subscriber> |
getSubscribers(Eid eid)
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 found in the Mapping System for given key.
|
boolean |
isMaster()
Get cluster master status.
|
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 |
setIsMaster(boolean isMaster)
Set cluster master status.
|
void |
setLookupPolicy(IMappingService.LookupPolicy policy)
Configures Mapping Service mapping lookup policy option.
|
void |
setMappingMerge(boolean mappingMerge)
Configures Mapping Service mapping merge option.
|
void |
subscribe(Subscriber subscriber,
Eid subscribedEid)
Subscribe a Subscriber to receive updates about mapping changes for an EID.
|
void addMapping(MappingOrigin origin, Eid key, SiteId siteId, MappingData mapping)
origin
- Table where mapping should be addedkey
- Key of the mappingsiteId
- Site that stores the mappingmapping
- Mapping to be storedMappingData addNegativeMapping(Eid key)
key
- Key of the mappingMappingData getMapping(MappingOrigin origin, Eid key)
origin
- Table where the mapping should be looked up.key
- Key to be looked upMappingData getMapping(Eid key)
key
- Key to be looked upMappingData getMapping(Eid srcKey, Eid dstKey)
srcKey
- Source key being looked updstKey
- Destination key being looked upEid getWidestNegativePrefix(Eid key)
key
- Key being looked upSet<Eid> getSubtree(MappingOrigin origin, Eid key)
origin
- Table where the key should be looked upkey
- Key to be looked upvoid refreshMappingRegistration(Eid key, XtrId xtrId, Long timestamp)
key
- The EID whose registration must be refreshedxtrId
- xTR-ID of the mapping to be refreshedtimestamp
- New timestamp for the mappingvoid removeMapping(MappingOrigin origin, Eid key)
origin
- Table from where the mapping should be removedkey
- Key to be removedvoid addAuthenticationKey(Eid key, MappingAuthkey authKey)
key
- The key for which the authentication key is addedauthKey
- The authentication keyvoid subscribe(Subscriber subscriber, Eid subscribedEid)
subscriber
- The Subscriber object with information about the subscribersubscribedEid
- The EID for which the subscriber will receive updatesSet<Subscriber> getSubscribers(Eid eid)
eid
- The EID to be looked upMappingAuthkey getAuthenticationKey(Eid key)
key
- The key for which the authentication key is being looked up.void removeAuthenticationKey(Eid key)
key
- Key for which the authentication key should be removed.void addData(MappingOrigin origin, Eid key, String subKey, Object data)
origin
- Table where data should be insertedkey
- The key where data should be insertedsubKey
- The subKey where data should be inserteddata
- The data to be storedObject getData(MappingOrigin origin, Eid key, String subKey)
origin
- Table from where the data should be readkey
- The key where the data is storedsubKey
- The subKey where data is storedvoid removeData(MappingOrigin origin, Eid key, String subKey)
origin
- The table from where the data should be removedkey
- The key of the data to be removedsubKey
- The subKey of the data to be removedEid getParentPrefix(Eid key)
key
- The key which parent is to be returned.void setMappingMerge(boolean mappingMerge)
mappingMerge
- enables or disables mapping mergevoid setLookupPolicy(IMappingService.LookupPolicy policy)
policy
- the policy to be activatedString printMappings()
String prettyPrintMappings()
String printKeys()
String prettyPrintKeys()
void cleanCachedMappings()
void setIsMaster(boolean isMaster)
isMaster
- is|isn't masterboolean isMaster()
Copyright © 2019 OpenDaylight. All rights reserved.