Class ApiEhcache

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

public class ApiEhcache extends Object implements IApiCache
  • Constructor Details

    • ApiEhcache

      public ApiEhcache()
  • Method Details

    • destroy

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

      public Object get(String key)
      Workaround to avoid NPE after a full reload (/adapterHandlerAsAdmin.do?action=fullreload) get() and isKeyInCache() are not synchronized methods and do not contain any state checking.
      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
    • flush

      public void flush()
    • clear

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

      public void setEternal(boolean eternal)
    • setOverflowToDisk

      public void setOverflowToDisk(boolean overflowToDisk)
    • setMaxElementsOnDisk

      public void setMaxElementsOnDisk(int maxElementsOnDisk)
    • setDiskPersistent

      public void setDiskPersistent(boolean diskPersistent)