Class CachingComponent<K,​V>

    • Method Detail

      • getObjectFromCache

        protected V getObjectFromCache​(K key)
        Returns an object from the cache, correspondong to the specified key, or null if none.
        Parameters:
        key - the object's key.
        Returns:
        the object from cache.
      • addObjectInCache

        protected void addObjectInCache​(K key,
                                        V object)
        Adds a key/object pair in the cache.
        Parameters:
        key - the object's key.
        object - the object to be cached.
      • removeObjectFromCache

        protected void removeObjectFromCache​(K key)
        Removes a key/object pair in the cache.
        Parameters:
        key - the object's key.
      • clearCache

        protected void clearCache()
        Removes all entries from the cache.
      • isCacheEnabled

        protected boolean isCacheEnabled()
        Returns true if the cache is enabled.
        Returns:
        true if the cache is enabled.