Interface AdminCache

All Known Implementing Classes:
AdminCacheFileStore, AdminCacheMemStore, AdminCacheWeakReference

public interface AdminCache
Simple cache for administration framework.
Author:
mmares
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checked if content is in the cache.
    <A> A
    get(String key, Class<A> clazz)
    Retrieve data from cache.
    Date when was cached data last updated.
    void
    put(String key, Object data)
    Puts data to cache.
  • Method Details

    • get

      <A> A get(String key, Class<A> clazz)
      Retrieve data from cache.
      Parameters:
      key - in the cache
      clazz - Cache data will be converted to requested type using appropriate AdminCacheObjectProvider
      Returns:
      Cached data converted to requested type or null if not cached
    • put

      void put(String key, Object data)
      Puts data to cache.
      Parameters:
      key - in the cache
      data - Cached data will be converted to raw bytes using appropriate AdminCacheObjectProvider
    • contains

      boolean contains(String key)
      Checked if content is in the cache.
      Parameters:
      key - in the cache
    • lastUpdated

      Date lastUpdated(String key)
      Date when was cached data last updated.
      Parameters:
      key - in the cache
      Returns:
      Date of last update or null if does not exist in cache