Class AuthKeyDb
- java.lang.Object
-
- org.opendaylight.lispflowmapping.mapcache.AuthKeyDb
-
- All Implemented Interfaces:
IAuthKeyDb
public class AuthKeyDb extends java.lang.Object implements IAuthKeyDb
Simple in-memory database for authentication keys, that works with 'simple' addresses (see lisp-proto.yang). It can do longest prefix matching for IP addresses.- Author:
- Lorand Jakab
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAuthenticationKey(Eid eid, MappingAuthkey authKey)
Add authentication key.MappingAuthkey
getAuthenticationKey(Eid eid)
Retrieve authentication key.java.lang.String
prettyPrintKeys()
Print keys in cache in a human friendly format.java.lang.String
printKeys()
Print authentication keys in database.void
removeAuthenticationKey(Eid eid)
Remove authentication key.
-
-
-
Constructor Detail
-
AuthKeyDb
public AuthKeyDb(ILispDAO dao)
-
-
Method Detail
-
addAuthenticationKey
public void addAuthenticationKey(Eid eid, MappingAuthkey authKey)
Description copied from interface:IAuthKeyDb
Add authentication key.- Specified by:
addAuthenticationKey
in interfaceIAuthKeyDb
- Parameters:
eid
- The key for which the authentication key is addedauthKey
- The authentication key
-
getAuthenticationKey
public MappingAuthkey getAuthenticationKey(Eid eid)
Description copied from interface:IAuthKeyDb
Retrieve authentication key.- Specified by:
getAuthenticationKey
in interfaceIAuthKeyDb
- Parameters:
eid
- The key for which the authentication key is being looked up.- Returns:
- The authentication key.
-
removeAuthenticationKey
public void removeAuthenticationKey(Eid eid)
Description copied from interface:IAuthKeyDb
Remove authentication key.- Specified by:
removeAuthenticationKey
in interfaceIAuthKeyDb
- Parameters:
eid
- Key for which the authentication key should be removed.
-
printKeys
public java.lang.String printKeys()
Description copied from interface:IAuthKeyDb
Print authentication keys in database. Used for testing, debugging and the karaf shell.- Specified by:
printKeys
in interfaceIAuthKeyDb
- Returns:
- a String consisting of all the authentication keys in the database
-
prettyPrintKeys
public java.lang.String prettyPrintKeys()
Description copied from interface:IAuthKeyDb
Print keys in cache in a human friendly format.- Specified by:
prettyPrintKeys
in interfaceIAuthKeyDb
- Returns:
- a String consisting of all the keys in the cache
-
-