Class JKAbstractCacheManager

java.lang.Object
com.jk.core.cache.simple.JKAbstractCacheManager
All Implemented Interfaces:
JKCacheManager
Direct Known Subclasses:
JKDefaultCacheManager, JKTimedAndSizeCacheManager

public abstract class JKAbstractCacheManager extends Object implements JKCacheManager
The Class JKAbstractCacheManager.
  • Field Details

    • logger

      protected JKLogger logger
      The logger.
  • Constructor Details

    • JKAbstractCacheManager

      public JKAbstractCacheManager()
  • Method Details

    • cache

      public void cache(Object key, Object object)
      Cache.
      Specified by:
      cache in interface JKCacheManager
      Parameters:
      key - the key
      object - the object
    • cache

      public <T> void cache(Object key, Object object, Class<T> clas)
      Cache.
      Specified by:
      cache in interface JKCacheManager
      Type Parameters:
      T - the generic type
      Parameters:
      key - the key
      object - the object
      clas - the clas
    • clear

      public void clear(Class<?> clas)
      Clear.
      Specified by:
      clear in interface JKCacheManager
      Parameters:
      clas - the clas
    • get

      public <T> T get(Object key, Class<T> clas)
      Gets the.
      Specified by:
      get in interface JKCacheManager
      Type Parameters:
      T - the generic type
      Parameters:
      key - the key
      clas - the clas
      Returns:
      the t
    • getCachableMap

      public JKMap<Object,Object> getCachableMap(Class<?> clas)
      Gets the cachable map.
      Specified by:
      getCachableMap in interface JKCacheManager
      Parameters:
      clas - the clas
      Returns:
      the cachable map
    • createCacheMap

      protected JKMap<Object,Object> createCacheMap()
    • isAllowNullable

      public boolean isAllowNullable()
      Checks if is allow nullable.
      Returns:
      true, if is allow nullable
    • isAvailable

      public boolean isAvailable(Object key, Class<?> clas)
      Checks if is available.
      Specified by:
      isAvailable in interface JKCacheManager
      Parameters:
      key - the key
      clas - the clas
      Returns:
      true, if is available
    • remove

      public void remove(Object key, Class<?> clas)
      Removes the.
      Specified by:
      remove in interface JKCacheManager
      Parameters:
      key - the key
      clas - the clas
    • setAllowNullable

      public void setAllowNullable(boolean allowNullable)
      Sets the allow nullable.
      Parameters:
      allowNullable - the new allow nullable
    • clear

      public void clear()
      Clear.
      Specified by:
      clear in interface JKCacheManager