Interface CacheManager

  • All Known Implementing Classes:
    DefaultCacheManager

    public interface CacheManager
    Cache manager which is used as the top level interaction when dealing with cached objects
    • Method Detail

      • clearAllEntries

        void clearAllEntries()
        Clears all available caches. Should not be used in production. Can be applied on "soft" application restart.
      • getCacheNames

        Collection<String> getCacheNames()
        Returns a collection of all cache names
        Returns:
        Collection of all cache names
      • getCaches

        Collection<Cache> getCaches()
        Returns a collection of all caches
        Returns:
        collection of all caches
      • getCache

        Cache getCache​(String cacheName)
                throws MappingException
        Get cache object by name.
        Parameters:
        cacheName - unique cache name
        Returns:
        Cache object found
        Throws:
        MappingException - exception is thrown if no cache found
      • putCache

        Cache putCache​(String cacheName,
                       int maximumSize)
                throws MappingException
        Puts cache object into store
        Parameters:
        cacheName - cache name to store
        maximumSize - maximum number of objects to store in cache
        Returns:
        Cache object created
        Throws:
        MappingException - exception is thrown if cache already exists
      • cacheExists

        boolean cacheExists​(String cacheName)
        Checks if cache name exists
        Parameters:
        cacheName - cache name to find
        Returns:
        true if found, false if doesn't exist