Class ApiMemcached

java.lang.Object
org.frankframework.http.rest.ApiMemcached
All Implemented Interfaces:
IApiCache

public class ApiMemcached extends Object implements IApiCache
  • Field Details

    • log

      protected org.apache.logging.log4j.Logger log
  • Constructor Details

    • ApiMemcached

      public ApiMemcached()
  • Method Details

    • get

      public Object get(String key)
      Description copied from interface: IApiCache
      Retrieve an object from the cache
      Specified by:
      get in interface IApiCache
      Parameters:
      key - name of the object to fetch
      Returns:
      null or value of the stored object
    • put

      public void put(String key, Object value)
      Description copied from interface: IApiCache
      Place an object in the cache
      Specified by:
      put in interface IApiCache
      Parameters:
      key - name of the object to store
      value - value of the object
    • put

      public void put(String key, Object value, int ttl)
      Description copied from interface: IApiCache
      Place an object in the cache
      Specified by:
      put in interface IApiCache
      Parameters:
      key - name of the object to store
      value - value of the object
      ttl - time to live, when the object expires
    • remove

      public boolean remove(String key)
      Description copied from interface: IApiCache
      Remove an object from the cache
      Specified by:
      remove in interface IApiCache
      Parameters:
      key - name of the object to remove
      Returns:
      returns true when successfully removed the object
    • containsKey

      public boolean containsKey(String key)
      Description copied from interface: IApiCache
      Checks whether or not an object has previously been stored in the cache
      Specified by:
      containsKey in interface IApiCache
      Parameters:
      key - name of the object to find
      Returns:
      true when found
    • clear

      public void clear()
      Description copied from interface: IApiCache
      Removes all items in the cache.
      Specified by:
      clear in interface IApiCache
    • destroy

      public void destroy()
      Description copied from interface: IApiCache
      Closes the cache.
      Specified by:
      destroy in interface IApiCache