public class MappingService extends Object implements OdlMappingserviceService, IMappingService, AutoCloseable
IMappingService.LookupPolicy| Constructor and Description |
|---|
MappingService(org.opendaylight.controller.md.sal.binding.api.DataBroker broker,
org.opendaylight.controller.md.sal.binding.api.NotificationPublishService notificationPublishService,
ILispDAO lispDAO) |
| 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.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
addKey(AddKeyInput input) |
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
addKeys(AddKeysInput input) |
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
addMapping(AddMappingInput input) |
void |
addMapping(MappingOrigin origin,
Eid key,
SiteId siteId,
MappingData mappingData)
Add mapping.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
addMappings(AddMappingsInput input) |
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.
|
void |
close() |
Future<org.opendaylight.yangtools.yang.common.RpcResult<GetAllKeysOutput>> |
getAllKeys() |
Future<org.opendaylight.yangtools.yang.common.RpcResult<GetAllMappingsOutput>> |
getAllMappings() |
MappingAuthkey |
getAuthenticationKey(Eid key)
Retrieve authentication key.
|
Object |
getData(MappingOrigin origin,
Eid key,
String subKey)
Generic retrieval of data.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<GetKeyOutput>> |
getKey(GetKeyInput input) |
Future<org.opendaylight.yangtools.yang.common.RpcResult<GetKeysOutput>> |
getKeys(GetKeysInput input) |
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.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<GetMappingOutput>> |
getMapping(GetMappingInput input) |
MappingData |
getMapping(MappingOrigin origin,
Eid key)
Retrieves mapping with given origin for the provided key.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<GetMappingsOutput>> |
getMappings(GetMappingsInput input) |
Future<org.opendaylight.yangtools.yang.common.RpcResult<GetMappingWithXtrIdOutput>> |
getMappingWithXtrId(GetMappingWithXtrIdInput input) |
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.
|
void |
initialize() |
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.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
removeAllKeys() |
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
removeAllMappings() |
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
removeAllOperationalContent() |
void |
removeAuthenticationKey(Eid key)
Remove authentication key.
|
void |
removeData(MappingOrigin origin,
Eid key,
String subKey)
Generic removal of data.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
removeKey(RemoveKeyInput input) |
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
removeKeys(RemoveKeysInput input) |
void |
removeMapping(MappingOrigin origin,
Eid key)
Remove mapping.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
removeMapping(RemoveMappingInput input) |
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
removeMappings(RemoveMappingsInput input) |
void |
setIsMaster(boolean isMaster)
Set cluster master status.
|
void |
setLookupPolicy(IMappingService.LookupPolicy policy)
Configures Mapping Service mapping lookup policy option.
|
void |
setMappingMerge(boolean mergeMapping)
Configures Mapping Service mapping merge option.
|
void |
subscribe(Subscriber subscriber,
Eid subscribedEid)
Subscribe a Subscriber to receive updates about mapping changes for an EID.
|
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
updateKey(UpdateKeyInput input) |
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
updateKeys(UpdateKeysInput input) |
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
updateMapping(UpdateMappingInput input) |
Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> |
updateMappings(UpdateMappingsInput input) |
public MappingService(org.opendaylight.controller.md.sal.binding.api.DataBroker broker,
org.opendaylight.controller.md.sal.binding.api.NotificationPublishService notificationPublishService,
ILispDAO lispDAO)
public void setMappingMerge(boolean mergeMapping)
IMappingServicesetMappingMerge in interface IMappingServicemergeMapping - enables or disables mapping mergepublic void setLookupPolicy(IMappingService.LookupPolicy policy)
IMappingServicesetLookupPolicy in interface IMappingServicepolicy - the policy to be activatedpublic void initialize()
public Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> addKey(AddKeyInput input)
addKey in interface OdlMappingserviceServicepublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> addMapping(AddMappingInput input)
addMapping in interface OdlMappingserviceServicepublic void addMapping(MappingOrigin origin, Eid key, SiteId siteId, MappingData mappingData)
IMappingServiceaddMapping in interface IMappingServiceorigin - Table where mapping should be addedkey - Key of the mappingsiteId - Site that stores the mappingmappingData - Mapping to be storedpublic MappingData addNegativeMapping(Eid key)
IMappingServiceaddNegativeMapping in interface IMappingServicekey - Key of the mappingpublic void refreshMappingRegistration(Eid key, XtrId xtrId, Long timestamp)
IMappingServicerefreshMappingRegistration in interface IMappingServicekey - The EID whose registration must be refreshedxtrId - xTR-ID of the mapping to be refreshedtimestamp - New timestamp for the mappingpublic Future<org.opendaylight.yangtools.yang.common.RpcResult<GetKeyOutput>> getKey(GetKeyInput input)
getKey in interface OdlMappingserviceServicejava.util.concurrent.Future key, or null if not presentpublic Future<org.opendaylight.yangtools.yang.common.RpcResult<GetMappingOutput>> getMapping(GetMappingInput input)
getMapping in interface OdlMappingserviceServicejava.util.concurrent.Future mapping, or null if not presentpublic MappingData getMapping(MappingOrigin origin, Eid key)
IMappingServicegetMapping in interface IMappingServiceorigin - Table where the mapping should be looked up.key - Key to be looked uppublic MappingData getMapping(Eid key)
IMappingServicegetMapping in interface IMappingServicekey - Key to be looked uppublic MappingData getMapping(Eid srcKey, Eid dstKey)
IMappingServicegetMapping in interface IMappingServicesrcKey - Source key being looked updstKey - Destination key being looked uppublic void subscribe(Subscriber subscriber, Eid subscribedEid)
IMappingServicesubscribe in interface IMappingServicesubscriber - The Subscriber object with information about the subscribersubscribedEid - The EID for which the subscriber will receive updatespublic Set<Subscriber> getSubscribers(Eid eid)
IMappingServicegetSubscribers in interface IMappingServiceeid - The EID to be looked uppublic Future<org.opendaylight.yangtools.yang.common.RpcResult<GetMappingWithXtrIdOutput>> getMappingWithXtrId(GetMappingWithXtrIdInput input)
getMappingWithXtrId in interface OdlMappingserviceServicejava.util.concurrent.Future mappingWithXtrId, or null if not presentpublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> removeKey(RemoveKeyInput input)
removeKey in interface OdlMappingserviceServicepublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> removeMapping(RemoveMappingInput input)
removeMapping in interface OdlMappingserviceServicepublic void removeMapping(MappingOrigin origin, Eid key)
IMappingServiceremoveMapping in interface IMappingServiceorigin - Table from where the mapping should be removedkey - Key to be removedpublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> updateKey(UpdateKeyInput input)
updateKey in interface OdlMappingserviceServicepublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> updateMapping(UpdateMappingInput input)
updateMapping in interface OdlMappingserviceServicepublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> removeKeys(RemoveKeysInput input)
removeKeys in interface OdlMappingserviceServicepublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> removeMappings(RemoveMappingsInput input)
removeMappings in interface OdlMappingserviceServicepublic Future<org.opendaylight.yangtools.yang.common.RpcResult<GetKeysOutput>> getKeys(GetKeysInput input)
getKeys in interface OdlMappingserviceServicejava.util.concurrent.Future keys, or null if not presentpublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> addMappings(AddMappingsInput input)
addMappings in interface OdlMappingserviceServicepublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> updateKeys(UpdateKeysInput input)
updateKeys in interface OdlMappingserviceServicepublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> removeAllMappings()
removeAllMappings in interface OdlMappingserviceServicepublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> removeAllKeys()
removeAllKeys in interface OdlMappingserviceServicepublic Future<org.opendaylight.yangtools.yang.common.RpcResult<GetAllKeysOutput>> getAllKeys()
getAllKeys in interface OdlMappingserviceServicejava.util.concurrent.Future allKeys, or null if not presentpublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> updateMappings(UpdateMappingsInput input)
updateMappings in interface OdlMappingserviceServicepublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> addKeys(AddKeysInput input)
addKeys in interface OdlMappingserviceServicepublic Future<org.opendaylight.yangtools.yang.common.RpcResult<GetAllMappingsOutput>> getAllMappings()
getAllMappings in interface OdlMappingserviceServicejava.util.concurrent.Future allMappings, or null if not presentpublic Future<org.opendaylight.yangtools.yang.common.RpcResult<GetMappingsOutput>> getMappings(GetMappingsInput input)
getMappings in interface OdlMappingserviceServicejava.util.concurrent.Future mappings, or null if not presentpublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> removeAllOperationalContent()
removeAllOperationalContent in interface OdlMappingserviceServicepublic Eid getWidestNegativePrefix(Eid key)
IMappingServicegetWidestNegativePrefix in interface IMappingServicekey - Key being looked uppublic Set<Eid> getSubtree(MappingOrigin origin, Eid key)
IMappingServicegetSubtree in interface IMappingServiceorigin - Table where the key should be looked upkey - Key to be looked uppublic void addAuthenticationKey(Eid key, MappingAuthkey authKey)
IMappingServiceaddAuthenticationKey in interface IMappingServicekey - The key for which the authentication key is addedauthKey - The authentication keypublic MappingAuthkey getAuthenticationKey(Eid key)
IMappingServicegetAuthenticationKey in interface IMappingServicekey - The key for which the authentication key is being looked up.public void removeAuthenticationKey(Eid key)
IMappingServiceremoveAuthenticationKey in interface IMappingServicekey - Key for which the authentication key should be removed.public void addData(MappingOrigin origin, Eid key, String subKey, Object data)
IMappingServiceaddData in interface IMappingServiceorigin - Table where data should be insertedkey - The key where data should be insertedsubKey - The subKey where data should be inserteddata - The data to be storedpublic Object getData(MappingOrigin origin, Eid key, String subKey)
IMappingServicegetData in interface IMappingServiceorigin - Table from where the data should be readkey - The key where the data is storedsubKey - The subKey where data is storedpublic void removeData(MappingOrigin origin, Eid key, String subKey)
IMappingServiceremoveData in interface IMappingServiceorigin - The table from where the data should be removedkey - The key of the data to be removedsubKey - The subKey of the data to be removedpublic Eid getParentPrefix(Eid key)
IMappingServicegetParentPrefix in interface IMappingServicekey - The key which parent is to be returned.public String printMappings()
IMappingServiceprintMappings in interface IMappingServicepublic String prettyPrintMappings()
IMappingServiceprettyPrintMappings in interface IMappingServicepublic String printKeys()
IMappingServiceprintKeys in interface IMappingServicepublic String prettyPrintKeys()
IMappingServiceprettyPrintKeys in interface IMappingServicepublic void close()
throws Exception
close in interface AutoCloseableExceptionpublic void cleanCachedMappings()
IMappingServicecleanCachedMappings in interface IMappingServicepublic void setIsMaster(boolean isMaster)
IMappingServicesetIsMaster in interface IMappingServiceisMaster - is|isn't masterpublic boolean isMaster()
IMappingServiceisMaster in interface IMappingServiceCopyright © 2019 OpenDaylight. All rights reserved.