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 voidaddAuthenticationKey(Eid eid, MappingAuthkey authKey)Add authentication key.MappingAuthkeygetAuthenticationKey(Eid eid)Retrieve authentication key.java.lang.StringprettyPrintKeys()Print keys in cache in a human friendly format.java.lang.StringprintKeys()Print authentication keys in database.voidremoveAuthenticationKey(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:IAuthKeyDbAdd authentication key.- Specified by:
addAuthenticationKeyin 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:IAuthKeyDbRetrieve authentication key.- Specified by:
getAuthenticationKeyin 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:IAuthKeyDbRemove authentication key.- Specified by:
removeAuthenticationKeyin interfaceIAuthKeyDb- Parameters:
eid- Key for which the authentication key should be removed.
-
printKeys
public java.lang.String printKeys()
Description copied from interface:IAuthKeyDbPrint authentication keys in database. Used for testing, debugging and the karaf shell.- Specified by:
printKeysin interfaceIAuthKeyDb- Returns:
- a String consisting of all the authentication keys in the database
-
prettyPrintKeys
public java.lang.String prettyPrintKeys()
Description copied from interface:IAuthKeyDbPrint keys in cache in a human friendly format.- Specified by:
prettyPrintKeysin interfaceIAuthKeyDb- Returns:
- a String consisting of all the keys in the cache
-
-