Interface Cache

All Known Implementing Classes:
SoftReferenceCache

public interface Cache
  • Method Details

    • put

      Object put(Object key, Object value, int sizeEstimate)
      Parameters:
      key - value to be used as key
      value - value to be stored
      sizeEstimate - estimated size
      Returns:
      the old object, that was replaced if present. Otherwise null.
    • get

      Object get(Object key)
    • clear

      void clear()
      Removes all mappings from a map (optional operation).
      Throws:
      UnsupportedOperationException - if clear() is not supported by the map.
    • remove

      Object remove(Object key)
      Parameters:
      key - the key of the to be removed object
      Returns:
      the removed object, if present. Otherwise null.