Interface ObjectCacheManager<T>

All Known Implementing Classes:
AbstractObjectCacheManager, Cache2Test.TestObjectCacheManager, ObjectCacheManagerImpl

public interface ObjectCacheManager<T>
The CacheManager manages access, creation, updating and destruction of cached objects. This means coordination of low-level cache elements, encapsulation and outside representation as one cache.
See Also:
  • Method Details

    • fetch

      T fetch(ObjectKey<T> objectKey)
      Looks for the object under the given ObjectKey. There are three possibilities:
      When the object is found, it will be returned.
      When no object is found, the ObjectCreator creates a new one. The newly created object will be put on the cache and returned.
      When the signature of the objectKey is outdated, the appropriate cached object (when available) will be removed. The keys signature will be renewed, the ObjectCreator creates a new object which is put on the cache and returned.
      Parameters:
      objectKey - ObjectKey
      Returns:
      cached object.
    • invalidate

      void invalidate(ObjectKey<T> objectKey)
      Invalidates the object under the given (@link ObjectKey}
      Parameters:
      objectKey - the object key
    • getCache

      ObjectCache<T> getCache()
      Returns the underlaying cache. The cache does not have any automated management and provides only low-level access.
      Returns:
      ObjectCache the cache implementation
    • setCache

      void setCache(ObjectCache<T> objectCache)
      Set the underlaying cache implementation
      Parameters:
      objectCache - the cache implementation