Class CacheFilter

    • Field Detail

      • next

        protected final Cache next
    • Constructor Detail

      • CacheFilter

        public CacheFilter​(Cache next)
    • Method Detail

      • put

        public Object put​(Object key,
                          Object value)
        Description copied from interface: Cache
        Puts an object into the cache.
        Specified by:
        put in interface Cache
      • get

        public Object get​(Object key)
        Description copied from interface: Cache
        Gets an object that was previously put into this object.
        Specified by:
        get in interface Cache
        Returns:
        null if the object was not previously put or if the object has expired out of the cache.
      • remove

        public Object remove​(Object key)
        Description copied from interface: Cache
        Removes an object from the cache.
        Specified by:
        remove in interface Cache
        Returns:
        the object associated with the key if it was still in the cache.
      • close

        public void close()
        Description copied from interface: Cache
        Lets a cache know it will not be used any further and that it can release acquired resources
        Specified by:
        close in interface Cache
      • size

        public int size()
        Description copied from interface: Cache
        How big is the cache right now?
        Specified by:
        size in interface Cache
        Returns:
        the size.