Class AdminCacheMemStore

java.lang.Object
com.sun.enterprise.admin.util.cache.AdminCacheMemStore
All Implemented Interfaces:
AdminCache

public class AdminCacheMemStore extends Object implements AdminCache
In memory AdminCache containing fixed amount of items. Rotation is based on last update first out.
This implementation is backgrounded by AdminCacheWeakReference and all non locally cached items are searched from that implementation.
Author:
mmares
  • Method Details

    • get

      public <A> A get(String key, Class<A> clazz)
      Description copied from interface: AdminCache
      Retrieve data from cache.
      Specified by:
      get in interface AdminCache
      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

      public void put(String key, Object data)
      Description copied from interface: AdminCache
      Puts data to cache.
      Specified by:
      put in interface AdminCache
      Parameters:
      key - in the cache
      data - Cached data will be converted to raw bytes using appropriate AdminCacheObjectProvider
    • contains

      public boolean contains(String key)
      Description copied from interface: AdminCache
      Checked if content is in the cache.
      Specified by:
      contains in interface AdminCache
      Parameters:
      key - in the cache
    • lastUpdated

      public Date lastUpdated(String key)
      Description copied from interface: AdminCache
      Date when was cached data last updated.
      Specified by:
      lastUpdated in interface AdminCache
      Parameters:
      key - in the cache
      Returns:
      Date of last update or null if does not exist in cache
    • getInstance

      public static AdminCacheMemStore getInstance()