Class MappingService
- java.lang.Object
-
- org.opendaylight.lispflowmapping.implementation.MappingService
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,IMappingService
,OdlMappingserviceService
,org.opendaylight.yangtools.yang.binding.RpcService
public class MappingService extends java.lang.Object implements OdlMappingserviceService, IMappingService, java.lang.AutoCloseable
Dispatcher of API calls that implements the RPC and Java APIs in mappingservice.yang and IMappingService respectively. It also coordinates and acts as container for all objects in charge of - saving and updating md-sal datastore stored mappings - monitoring md-sal datastore mapping updates and pushing them to the in memory mapping-system - in memory mapping-system- Author:
- Lorand Jakab, Florin Coras
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opendaylight.lispflowmapping.interfaces.mappingservice.IMappingService
IMappingService.LookupPolicy
-
-
Constructor Summary
Constructors Constructor Description MappingService(org.opendaylight.mdsal.binding.api.DataBroker broker, org.opendaylight.mdsal.binding.api.NotificationPublishService notificationPublishService, ILispDAO lispDAO)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAuthenticationKey(Eid key, MappingAuthkey authKey)
Add authentication key.void
addData(MappingOrigin origin, Eid key, java.lang.String subKey, java.lang.Object data)
Generic addition of data.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<AddKeyOutput>>
addKey(AddKeyInput input)
Invokeadd-key
RPC.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<AddKeysOutput>>
addKeys(AddKeysInput input)
Invokeadd-keys
RPC.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<AddMappingOutput>>
addMapping(AddMappingInput input)
Invokeadd-mapping
RPC.void
addMapping(MappingOrigin origin, Eid key, SiteId siteId, MappingData mappingData)
Add mapping.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<AddMappingsOutput>>
addMappings(AddMappingsInput input)
Invokeadd-mappings
RPC.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()
com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<GetAllKeysOutput>>
getAllKeys(GetAllKeysInput input)
Invokeget-all-keys
RPC.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<GetAllMappingsOutput>>
getAllMappings(GetAllMappingsInput input)
Invokeget-all-mappings
RPC.MappingAuthkey
getAuthenticationKey(Eid key)
Retrieve authentication key.java.lang.Object
getData(MappingOrigin origin, Eid key, java.lang.String subKey)
Generic retrieval of data.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<GetKeyOutput>>
getKey(GetKeyInput input)
Invokeget-key
RPC.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<GetKeysOutput>>
getKeys(GetKeysInput input)
Invokeget-keys
RPC.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.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<GetMappingOutput>>
getMapping(GetMappingInput input)
Invokeget-mapping
RPC.MappingData
getMapping(MappingOrigin origin, Eid key)
Retrieves mapping with given origin for the provided key.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<GetMappingsOutput>>
getMappings(GetMappingsInput input)
Invokeget-mappings
RPC.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<GetMappingWithXtrIdOutput>>
getMappingWithXtrId(GetMappingWithXtrIdInput input)
Invokeget-mapping-with-xtr-id
RPC.Eid
getParentPrefix(Eid key)
Returns the parent prefix for given key.java.util.Set<Subscriber>
getSubscribers(Eid eid)
Retrieves the subscribers for an EID.java.util.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.java.lang.String
prettyPrintKeys()
Print keys in cache in a human friendly format.java.lang.String
prettyPrintMappings()
Print mappings in cache in a human friendly format.java.lang.String
printKeys()
Print all authentication keys.java.lang.String
printMappings()
Print all mappings.void
refreshMappingRegistration(Eid key, XtrId xtrId, java.lang.Long timestamp)
Refresh southbound mapping registration timestamp.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<RemoveAllKeysOutput>>
removeAllKeys(RemoveAllKeysInput input)
Invokeremove-all-keys
RPC.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<RemoveAllMappingsOutput>>
removeAllMappings(RemoveAllMappingsInput input)
Invokeremove-all-mappings
RPC.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<RemoveAllOperationalContentOutput>>
removeAllOperationalContent(RemoveAllOperationalContentInput input)
Invokeremove-all-operational-content
RPC.void
removeAuthenticationKey(Eid key)
Remove authentication key.void
removeData(MappingOrigin origin, Eid key, java.lang.String subKey)
Generic removal of data.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<RemoveKeyOutput>>
removeKey(RemoveKeyInput input)
Invokeremove-key
RPC.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<RemoveKeysOutput>>
removeKeys(RemoveKeysInput input)
Invokeremove-keys
RPC.void
removeMapping(MappingOrigin origin, Eid key)
Remove mapping.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<RemoveMappingOutput>>
removeMapping(RemoveMappingInput input)
Invokeremove-mapping
RPC.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<RemoveMappingsOutput>>
removeMappings(RemoveMappingsInput input)
Invokeremove-mappings
RPC.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.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<UpdateKeyOutput>>
updateKey(UpdateKeyInput input)
Invokeupdate-key
RPC.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<UpdateKeysOutput>>
updateKeys(UpdateKeysInput input)
Invokeupdate-keys
RPC.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<UpdateMappingOutput>>
updateMapping(UpdateMappingInput input)
Invokeupdate-mapping
RPC.com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<UpdateMappingsOutput>>
updateMappings(UpdateMappingsInput input)
Invokeupdate-mappings
RPC.
-
-
-
Constructor Detail
-
MappingService
public MappingService(org.opendaylight.mdsal.binding.api.DataBroker broker, org.opendaylight.mdsal.binding.api.NotificationPublishService notificationPublishService, ILispDAO lispDAO)
-
-
Method Detail
-
setMappingMerge
public void setMappingMerge(boolean mergeMapping)
Description copied from interface:IMappingService
Configures Mapping Service mapping merge option. If set to false, mappings with the same key are overwritten, otherwise, mappings with the same key but from different xTR-IDs are all stored.- Specified by:
setMappingMerge
in interfaceIMappingService
- Parameters:
mergeMapping
- enables or disables mapping merge
-
setLookupPolicy
public void setLookupPolicy(IMappingService.LookupPolicy policy)
Description copied from interface:IMappingService
Configures Mapping Service mapping lookup policy option.- Specified by:
setLookupPolicy
in interfaceIMappingService
- Parameters:
policy
- the policy to be activated
-
initialize
public void initialize()
-
addKey
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<AddKeyOutput>> addKey(AddKeyInput input)
Description copied from interface:OdlMappingserviceService
Invokeadd-key
RPC.- Specified by:
addKey
in interfaceOdlMappingserviceService
- Parameters:
input
- ofadd-key
- Returns:
- output of
add-key
-
addMapping
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<AddMappingOutput>> addMapping(AddMappingInput input)
Description copied from interface:OdlMappingserviceService
Invokeadd-mapping
RPC.- Specified by:
addMapping
in interfaceOdlMappingserviceService
- Parameters:
input
- ofadd-mapping
- Returns:
- output of
add-mapping
-
addMapping
public void addMapping(MappingOrigin origin, Eid key, SiteId siteId, MappingData mappingData)
Description copied from interface:IMappingService
Add mapping.- Specified by:
addMapping
in interfaceIMappingService
- Parameters:
origin
- Table where mapping should be addedkey
- Key of the mappingsiteId
- Site that stores the mappingmappingData
- Mapping to be stored
-
addNegativeMapping
public MappingData addNegativeMapping(Eid key)
Description copied from interface:IMappingService
Generate and add a negative mapping entry originated from the southbound, and return the generated mapping.- Specified by:
addNegativeMapping
in interfaceIMappingService
- Parameters:
key
- Key of the mapping- Returns:
- Returns the generated negative mapping (which is never null).
-
refreshMappingRegistration
public void refreshMappingRegistration(Eid key, XtrId xtrId, java.lang.Long timestamp)
Description copied from interface:IMappingService
Refresh southbound mapping registration timestamp.- Specified by:
refreshMappingRegistration
in interfaceIMappingService
- Parameters:
key
- The EID whose registration must be refreshedxtrId
- xTR-ID of the mapping to be refreshedtimestamp
- New timestamp for the mapping
-
getKey
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<GetKeyOutput>> getKey(GetKeyInput input)
Description copied from interface:OdlMappingserviceService
Invokeget-key
RPC.- Specified by:
getKey
in interfaceOdlMappingserviceService
- Parameters:
input
- ofget-key
- Returns:
- output of
get-key
-
getMapping
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<GetMappingOutput>> getMapping(GetMappingInput input)
Description copied from interface:OdlMappingserviceService
Invokeget-mapping
RPC.- Specified by:
getMapping
in interfaceOdlMappingserviceService
- Parameters:
input
- ofget-mapping
- Returns:
- output of
get-mapping
-
getMapping
public MappingData getMapping(MappingOrigin origin, Eid key)
Description copied from interface:IMappingService
Retrieves mapping with given origin for the provided key. The lookup policy for the key is defined in the Mapping System.- Specified by:
getMapping
in interfaceIMappingService
- Parameters:
origin
- Table where the mapping should be looked up.key
- Key to be looked up- Returns:
- Returns the mapping found in the Mapping System or null if nothing is found.
-
getMapping
public MappingData getMapping(Eid key)
Description copied from interface:IMappingService
Retrieves mapping for given key.The lookup policy for the key is defined in the Mapping System.- Specified by:
getMapping
in interfaceIMappingService
- Parameters:
key
- Key to be looked up- Returns:
- Returns the mapping found in the Mapping System or null if nothing is found.
-
getMapping
public MappingData getMapping(Eid srcKey, Eid dstKey)
Description copied from interface:IMappingService
Retrieves mapping with a Source/Dest policy. This method is meant to avoid the overhead of building LcafSourceDest addresses.- Specified by:
getMapping
in interfaceIMappingService
- Parameters:
srcKey
- Source key being looked updstKey
- Destination key being looked up- Returns:
- Returns the mapping found in the Mapping System or null if nothing is found.
-
subscribe
public void subscribe(Subscriber subscriber, Eid subscribedEid)
Description copied from interface:IMappingService
Subscribe a Subscriber to receive updates about mapping changes for an EID.- Specified by:
subscribe
in interfaceIMappingService
- Parameters:
subscriber
- The Subscriber object with information about the subscribersubscribedEid
- The EID for which the subscriber will receive updates
-
getSubscribers
public java.util.Set<Subscriber> getSubscribers(Eid eid)
Description copied from interface:IMappingService
Retrieves the subscribers for an EID.- Specified by:
getSubscribers
in interfaceIMappingService
- Parameters:
eid
- The EID to be looked up- Returns:
- The set of subscribers for the EID
-
getMappingWithXtrId
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<GetMappingWithXtrIdOutput>> getMappingWithXtrId(GetMappingWithXtrIdInput input)
Description copied from interface:OdlMappingserviceService
Invokeget-mapping-with-xtr-id
RPC.- Specified by:
getMappingWithXtrId
in interfaceOdlMappingserviceService
- Parameters:
input
- ofget-mapping-with-xtr-id
- Returns:
- output of
get-mapping-with-xtr-id
-
removeKey
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<RemoveKeyOutput>> removeKey(RemoveKeyInput input)
Description copied from interface:OdlMappingserviceService
Invokeremove-key
RPC.- Specified by:
removeKey
in interfaceOdlMappingserviceService
- Parameters:
input
- ofremove-key
- Returns:
- output of
remove-key
-
removeMapping
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<RemoveMappingOutput>> removeMapping(RemoveMappingInput input)
Description copied from interface:OdlMappingserviceService
Invokeremove-mapping
RPC.- Specified by:
removeMapping
in interfaceOdlMappingserviceService
- Parameters:
input
- ofremove-mapping
- Returns:
- output of
remove-mapping
-
removeMapping
public void removeMapping(MappingOrigin origin, Eid key)
Description copied from interface:IMappingService
Remove mapping.- Specified by:
removeMapping
in interfaceIMappingService
- Parameters:
origin
- Table from where the mapping should be removedkey
- Key to be removed
-
updateKey
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<UpdateKeyOutput>> updateKey(UpdateKeyInput input)
Description copied from interface:OdlMappingserviceService
Invokeupdate-key
RPC.- Specified by:
updateKey
in interfaceOdlMappingserviceService
- Parameters:
input
- ofupdate-key
- Returns:
- output of
update-key
-
updateMapping
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<UpdateMappingOutput>> updateMapping(UpdateMappingInput input)
Description copied from interface:OdlMappingserviceService
Invokeupdate-mapping
RPC.- Specified by:
updateMapping
in interfaceOdlMappingserviceService
- Parameters:
input
- ofupdate-mapping
- Returns:
- output of
update-mapping
-
removeKeys
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<RemoveKeysOutput>> removeKeys(RemoveKeysInput input)
Description copied from interface:OdlMappingserviceService
Invokeremove-keys
RPC.- Specified by:
removeKeys
in interfaceOdlMappingserviceService
- Parameters:
input
- ofremove-keys
- Returns:
- output of
remove-keys
-
removeMappings
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<RemoveMappingsOutput>> removeMappings(RemoveMappingsInput input)
Description copied from interface:OdlMappingserviceService
Invokeremove-mappings
RPC.- Specified by:
removeMappings
in interfaceOdlMappingserviceService
- Parameters:
input
- ofremove-mappings
- Returns:
- output of
remove-mappings
-
getKeys
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<GetKeysOutput>> getKeys(GetKeysInput input)
Description copied from interface:OdlMappingserviceService
Invokeget-keys
RPC.- Specified by:
getKeys
in interfaceOdlMappingserviceService
- Parameters:
input
- ofget-keys
- Returns:
- output of
get-keys
-
addMappings
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<AddMappingsOutput>> addMappings(AddMappingsInput input)
Description copied from interface:OdlMappingserviceService
Invokeadd-mappings
RPC.- Specified by:
addMappings
in interfaceOdlMappingserviceService
- Parameters:
input
- ofadd-mappings
- Returns:
- output of
add-mappings
-
updateKeys
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<UpdateKeysOutput>> updateKeys(UpdateKeysInput input)
Description copied from interface:OdlMappingserviceService
Invokeupdate-keys
RPC.- Specified by:
updateKeys
in interfaceOdlMappingserviceService
- Parameters:
input
- ofupdate-keys
- Returns:
- output of
update-keys
-
removeAllMappings
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<RemoveAllMappingsOutput>> removeAllMappings(RemoveAllMappingsInput input)
Description copied from interface:OdlMappingserviceService
Invokeremove-all-mappings
RPC.- Specified by:
removeAllMappings
in interfaceOdlMappingserviceService
- Parameters:
input
- ofremove-all-mappings
- Returns:
- output of
remove-all-mappings
-
removeAllKeys
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<RemoveAllKeysOutput>> removeAllKeys(RemoveAllKeysInput input)
Description copied from interface:OdlMappingserviceService
Invokeremove-all-keys
RPC.- Specified by:
removeAllKeys
in interfaceOdlMappingserviceService
- Parameters:
input
- ofremove-all-keys
- Returns:
- output of
remove-all-keys
-
getAllKeys
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<GetAllKeysOutput>> getAllKeys(GetAllKeysInput input)
Description copied from interface:OdlMappingserviceService
Invokeget-all-keys
RPC.- Specified by:
getAllKeys
in interfaceOdlMappingserviceService
- Parameters:
input
- ofget-all-keys
- Returns:
- output of
get-all-keys
-
updateMappings
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<UpdateMappingsOutput>> updateMappings(UpdateMappingsInput input)
Description copied from interface:OdlMappingserviceService
Invokeupdate-mappings
RPC.- Specified by:
updateMappings
in interfaceOdlMappingserviceService
- Parameters:
input
- ofupdate-mappings
- Returns:
- output of
update-mappings
-
addKeys
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<AddKeysOutput>> addKeys(AddKeysInput input)
Description copied from interface:OdlMappingserviceService
Invokeadd-keys
RPC.- Specified by:
addKeys
in interfaceOdlMappingserviceService
- Parameters:
input
- ofadd-keys
- Returns:
- output of
add-keys
-
getAllMappings
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<GetAllMappingsOutput>> getAllMappings(GetAllMappingsInput input)
Description copied from interface:OdlMappingserviceService
Invokeget-all-mappings
RPC.- Specified by:
getAllMappings
in interfaceOdlMappingserviceService
- Parameters:
input
- ofget-all-mappings
- Returns:
- output of
get-all-mappings
-
getMappings
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<GetMappingsOutput>> getMappings(GetMappingsInput input)
Description copied from interface:OdlMappingserviceService
Invokeget-mappings
RPC.- Specified by:
getMappings
in interfaceOdlMappingserviceService
- Parameters:
input
- ofget-mappings
- Returns:
- output of
get-mappings
-
removeAllOperationalContent
public com.google.common.util.concurrent.ListenableFuture<org.opendaylight.yangtools.yang.common.RpcResult<RemoveAllOperationalContentOutput>> removeAllOperationalContent(RemoveAllOperationalContentInput input)
Description copied from interface:OdlMappingserviceService
Invokeremove-all-operational-content
RPC.- Specified by:
removeAllOperationalContent
in interfaceOdlMappingserviceService
- Parameters:
input
- ofremove-all-operational-content
- Returns:
- output of
remove-all-operational-content
-
getWidestNegativePrefix
public Eid getWidestNegativePrefix(Eid key)
Description copied from interface:IMappingService
Retrieves widest negative prefix found in the Mapping System for given key.- Specified by:
getWidestNegativePrefix
in interfaceIMappingService
- Parameters:
key
- Key being looked up- Returns:
- Returns the widest negative prefix or null if nothing is found.
-
getSubtree
public java.util.Set<Eid> getSubtree(MappingOrigin origin, Eid key)
Description copied from interface:IMappingService
Retrieves the subtree of a maskable prefix from the given map-cache.- Specified by:
getSubtree
in interfaceIMappingService
- Parameters:
origin
- Table where the key should be looked upkey
- Key to be looked up- Returns:
- The child prefixes of the prefix, including the prefix itself if present
-
addAuthenticationKey
public void addAuthenticationKey(Eid key, MappingAuthkey authKey)
Description copied from interface:IMappingService
Add authentication key.- Specified by:
addAuthenticationKey
in interfaceIMappingService
- Parameters:
key
- The key for which the authentication key is addedauthKey
- The authentication key
-
getAuthenticationKey
public MappingAuthkey getAuthenticationKey(Eid key)
Description copied from interface:IMappingService
Retrieve authentication key.- Specified by:
getAuthenticationKey
in interfaceIMappingService
- Parameters:
key
- The key for which the authentication key is being looked up.- Returns:
- The authentication key.
-
removeAuthenticationKey
public void removeAuthenticationKey(Eid key)
Description copied from interface:IMappingService
Remove authentication key.- Specified by:
removeAuthenticationKey
in interfaceIMappingService
- Parameters:
key
- Key for which the authentication key should be removed.
-
addData
public void addData(MappingOrigin origin, Eid key, java.lang.String subKey, java.lang.Object data)
Description copied from interface:IMappingService
Generic addition of data. Not stored in MD-SAL datastore!- Specified by:
addData
in interfaceIMappingService
- Parameters:
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 stored
-
getData
public java.lang.Object getData(MappingOrigin origin, Eid key, java.lang.String subKey)
Description copied from interface:IMappingService
Generic retrieval of data.- Specified by:
getData
in interfaceIMappingService
- Parameters:
origin
- Table from where the data should be readkey
- The key where the data is storedsubKey
- The subKey where data is stored- Returns:
- The data
-
removeData
public void removeData(MappingOrigin origin, Eid key, java.lang.String subKey)
Description copied from interface:IMappingService
Generic removal of data.- Specified by:
removeData
in interfaceIMappingService
- Parameters:
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 removed
-
getParentPrefix
public Eid getParentPrefix(Eid key)
Description copied from interface:IMappingService
Returns the parent prefix for given key.- Specified by:
getParentPrefix
in interfaceIMappingService
- Parameters:
key
- The key which parent is to be returned.- Returns:
- The parent perfix of a specific key.
-
printMappings
public java.lang.String printMappings()
Description copied from interface:IMappingService
Print all mappings. Used for testing, debugging and the karaf shell.- Specified by:
printMappings
in interfaceIMappingService
- Returns:
- String consisting of all mappings
-
prettyPrintMappings
public java.lang.String prettyPrintMappings()
Description copied from interface:IMappingService
Print mappings in cache in a human friendly format.- Specified by:
prettyPrintMappings
in interfaceIMappingService
- Returns:
- a String consisting of all the mappings in the cache
-
printKeys
public java.lang.String printKeys()
Description copied from interface:IMappingService
Print all authentication keys. Used for testing, debugging and the karaf shell.- Specified by:
printKeys
in interfaceIMappingService
- Returns:
- String consisting of all mappings
-
prettyPrintKeys
public java.lang.String prettyPrintKeys()
Description copied from interface:IMappingService
Print keys in cache in a human friendly format.- Specified by:
prettyPrintKeys
in interfaceIMappingService
- Returns:
- a String consisting of all the keys in the cache
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
cleanCachedMappings
public void cleanCachedMappings()
Description copied from interface:IMappingService
Cleans all cached mappings.Used for testing.- Specified by:
cleanCachedMappings
in interfaceIMappingService
-
setIsMaster
public void setIsMaster(boolean isMaster)
Description copied from interface:IMappingService
Set cluster master status.- Specified by:
setIsMaster
in interfaceIMappingService
- Parameters:
isMaster
- is|isn't master
-
isMaster
public boolean isMaster()
Description copied from interface:IMappingService
Get cluster master status.- Specified by:
isMaster
in interfaceIMappingService
- Returns:
- isMaster is|isn't master
-
-