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)
IMappingService
setMappingMerge
in interface IMappingService
mergeMapping
- enables or disables mapping mergepublic void setLookupPolicy(IMappingService.LookupPolicy policy)
IMappingService
setLookupPolicy
in interface IMappingService
policy
- the policy to be activatedpublic void initialize()
public Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> addKey(AddKeyInput input)
addKey
in interface OdlMappingserviceService
public Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> addMapping(AddMappingInput input)
addMapping
in interface OdlMappingserviceService
public void addMapping(MappingOrigin origin, Eid key, SiteId siteId, MappingData mappingData)
IMappingService
addMapping
in interface IMappingService
origin
- Table where mapping should be addedkey
- Key of the mappingsiteId
- Site that stores the mappingmappingData
- Mapping to be storedpublic MappingData addNegativeMapping(Eid key)
IMappingService
addNegativeMapping
in interface IMappingService
key
- Key of the mappingpublic void refreshMappingRegistration(Eid key, XtrId xtrId, Long timestamp)
IMappingService
refreshMappingRegistration
in interface IMappingService
key
- 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 OdlMappingserviceService
java.util.concurrent.Future
key
, or null
if not presentpublic Future<org.opendaylight.yangtools.yang.common.RpcResult<GetMappingOutput>> getMapping(GetMappingInput input)
getMapping
in interface OdlMappingserviceService
java.util.concurrent.Future
mapping
, or null
if not presentpublic MappingData getMapping(MappingOrigin origin, Eid key)
IMappingService
getMapping
in interface IMappingService
origin
- Table where the mapping should be looked up.key
- Key to be looked uppublic MappingData getMapping(Eid key)
IMappingService
getMapping
in interface IMappingService
key
- Key to be looked uppublic MappingData getMapping(Eid srcKey, Eid dstKey)
IMappingService
getMapping
in interface IMappingService
srcKey
- Source key being looked updstKey
- Destination key being looked uppublic void subscribe(Subscriber subscriber, Eid subscribedEid)
IMappingService
subscribe
in interface IMappingService
subscriber
- The Subscriber object with information about the subscribersubscribedEid
- The EID for which the subscriber will receive updatespublic Set<Subscriber> getSubscribers(Eid eid)
IMappingService
getSubscribers
in interface IMappingService
eid
- The EID to be looked uppublic Future<org.opendaylight.yangtools.yang.common.RpcResult<GetMappingWithXtrIdOutput>> getMappingWithXtrId(GetMappingWithXtrIdInput input)
getMappingWithXtrId
in interface OdlMappingserviceService
java.util.concurrent.Future
mappingWithXtrId
, or null
if not presentpublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> removeKey(RemoveKeyInput input)
removeKey
in interface OdlMappingserviceService
public Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> removeMapping(RemoveMappingInput input)
removeMapping
in interface OdlMappingserviceService
public void removeMapping(MappingOrigin origin, Eid key)
IMappingService
removeMapping
in interface IMappingService
origin
- 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 OdlMappingserviceService
public Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> updateMapping(UpdateMappingInput input)
updateMapping
in interface OdlMappingserviceService
public Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> removeKeys(RemoveKeysInput input)
removeKeys
in interface OdlMappingserviceService
public Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> removeMappings(RemoveMappingsInput input)
removeMappings
in interface OdlMappingserviceService
public Future<org.opendaylight.yangtools.yang.common.RpcResult<GetKeysOutput>> getKeys(GetKeysInput input)
getKeys
in interface OdlMappingserviceService
java.util.concurrent.Future
keys
, or null
if not presentpublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> addMappings(AddMappingsInput input)
addMappings
in interface OdlMappingserviceService
public Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> updateKeys(UpdateKeysInput input)
updateKeys
in interface OdlMappingserviceService
public Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> removeAllMappings()
removeAllMappings
in interface OdlMappingserviceService
public Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> removeAllKeys()
removeAllKeys
in interface OdlMappingserviceService
public Future<org.opendaylight.yangtools.yang.common.RpcResult<GetAllKeysOutput>> getAllKeys()
getAllKeys
in interface OdlMappingserviceService
java.util.concurrent.Future
allKeys
, or null
if not presentpublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> updateMappings(UpdateMappingsInput input)
updateMappings
in interface OdlMappingserviceService
public Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> addKeys(AddKeysInput input)
addKeys
in interface OdlMappingserviceService
public Future<org.opendaylight.yangtools.yang.common.RpcResult<GetAllMappingsOutput>> getAllMappings()
getAllMappings
in interface OdlMappingserviceService
java.util.concurrent.Future
allMappings
, or null
if not presentpublic Future<org.opendaylight.yangtools.yang.common.RpcResult<GetMappingsOutput>> getMappings(GetMappingsInput input)
getMappings
in interface OdlMappingserviceService
java.util.concurrent.Future
mappings
, or null
if not presentpublic Future<org.opendaylight.yangtools.yang.common.RpcResult<Void>> removeAllOperationalContent()
removeAllOperationalContent
in interface OdlMappingserviceService
public Eid getWidestNegativePrefix(Eid key)
IMappingService
getWidestNegativePrefix
in interface IMappingService
key
- Key being looked uppublic Set<Eid> getSubtree(MappingOrigin origin, Eid key)
IMappingService
getSubtree
in interface IMappingService
origin
- Table where the key should be looked upkey
- Key to be looked uppublic void addAuthenticationKey(Eid key, MappingAuthkey authKey)
IMappingService
addAuthenticationKey
in interface IMappingService
key
- The key for which the authentication key is addedauthKey
- The authentication keypublic MappingAuthkey getAuthenticationKey(Eid key)
IMappingService
getAuthenticationKey
in interface IMappingService
key
- The key for which the authentication key is being looked up.public void removeAuthenticationKey(Eid key)
IMappingService
removeAuthenticationKey
in interface IMappingService
key
- Key for which the authentication key should be removed.public void addData(MappingOrigin origin, Eid key, String subKey, Object data)
IMappingService
addData
in interface IMappingService
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 storedpublic Object getData(MappingOrigin origin, Eid key, String subKey)
IMappingService
getData
in interface IMappingService
origin
- 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)
IMappingService
removeData
in interface IMappingService
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 removedpublic Eid getParentPrefix(Eid key)
IMappingService
getParentPrefix
in interface IMappingService
key
- The key which parent is to be returned.public String printMappings()
IMappingService
printMappings
in interface IMappingService
public String prettyPrintMappings()
IMappingService
prettyPrintMappings
in interface IMappingService
public String printKeys()
IMappingService
printKeys
in interface IMappingService
public String prettyPrintKeys()
IMappingService
prettyPrintKeys
in interface IMappingService
public void close() throws Exception
close
in interface AutoCloseable
Exception
public void cleanCachedMappings()
IMappingService
cleanCachedMappings
in interface IMappingService
public void setIsMaster(boolean isMaster)
IMappingService
setIsMaster
in interface IMappingService
isMaster
- is|isn't masterpublic boolean isMaster()
IMappingService
isMaster
in interface IMappingService
Copyright © 2019 OpenDaylight. All rights reserved.