java.lang.Object
org.opendaylight.lispflowmapping.mapcache.AuthKeyDb
All Implemented Interfaces:
IAuthKeyDb

public class AuthKeyDb extends 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
  • Constructor Details

    • AuthKeyDb

      public AuthKeyDb(ILispDAO dao)
  • Method Details

    • addAuthenticationKey

      public void addAuthenticationKey(Eid eid, MappingAuthkey authKey)
      Description copied from interface: IAuthKeyDb
      Add authentication key.
      Specified by:
      addAuthenticationKey in interface IAuthKeyDb
      Parameters:
      eid - The key for which the authentication key is added
      authKey - The authentication key
    • getAuthenticationKey

      public MappingAuthkey getAuthenticationKey(Eid eid)
      Description copied from interface: IAuthKeyDb
      Retrieve authentication key.
      Specified by:
      getAuthenticationKey in interface IAuthKeyDb
      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 interface IAuthKeyDb
      Parameters:
      eid - Key for which the authentication key should be removed.
    • printKeys

      public String printKeys()
      Description copied from interface: IAuthKeyDb
      Print authentication keys in database. Used for testing, debugging and the karaf shell.
      Specified by:
      printKeys in interface IAuthKeyDb
      Returns:
      a String consisting of all the authentication keys in the database
    • prettyPrintKeys

      public String prettyPrintKeys()
      Description copied from interface: IAuthKeyDb
      Print keys in cache in a human friendly format.
      Specified by:
      prettyPrintKeys in interface IAuthKeyDb
      Returns:
      a String consisting of all the keys in the cache