Class ResourceCacheImpl

  • All Implemented Interfaces:
    ResourceCache

    public class ResourceCacheImpl
    extends java.lang.Object
    implements ResourceCache
    Default implementation of the resource cache for the default ResourceManager. The cache uses a least recently used (LRU) algorithm, with a maximum size specified via the resource.manager.cache.size property (idenfied by the RuntimeConstants.RESOURCE_MANAGER_DEFAULTCACHE_SIZE constant). This property get be set to 0 or less for a greedy, unbounded cache (the behavior from pre-v1.5).
    Version:
    $Id: ResourceCacheImpl.java 898032 2010-01-11 19:51:03Z nbubna $
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map cache
      Cache storage, assumed to be thread-safe.
      protected RuntimeServices rsvc
      Runtime services, generally initialized by the initialize() method.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator enumerateKeys()
      returns an Iterator of Keys in the cache.
      Resource get​(java.lang.Object key)
      retrieves a Resource from the cache
      void initialize​(RuntimeServices rs)
      initializes the ResourceCache.
      Resource put​(java.lang.Object key, Resource value)
      stores a Resource in the cache
      Resource remove​(java.lang.Object key)
      removes a Resource from the cache
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait