Interface Cache<KeyType,​ValueType>

  • Type Parameters:
    KeyType - type of key being stored
    ValueType - java of value being stored
    All Known Implementing Classes:
    DefaultCache

    public interface Cache<KeyType,​ValueType>
    Cache which stores a single DozerCacheType type
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear()
      Removes all of the mappings from this map.
      boolean containsKey​(KeyType key)
      Returns true if this map contains a mapping for the specified key.
      ValueType get​(KeyType key)
      Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
      int getMaxSize()
      Returns the maximum number of entries which the cache can hold
      String getName()
      Returns the name of the overall cache store
      long getSize()
      Returns the number of key-value mappings in this map.
      void put​(KeyType key, ValueType value)
      Associates the specified value with the specified key in this map.
    • Method Detail

      • clear

        void clear()
        Removes all of the mappings from this map. The map will be empty after this call returns.
      • put

        void put​(KeyType key,
                 ValueType value)
        Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced.
        Parameters:
        key - key with which the specified value is to be associated
        value - value to be associated with the specified key
      • get

        ValueType get​(KeyType key)
        Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
        Parameters:
        key - key with which the specified value is to be associated
        Returns:
        value to be associated with the specified key
      • getName

        String getName()
        Returns the name of the overall cache store
        Returns:
        name of the overall cache store
      • getSize

        long getSize()
        Returns the number of key-value mappings in this map.
        Returns:
        the number of key-value mappings in this map
      • getMaxSize

        int getMaxSize()
        Returns the maximum number of entries which the cache can hold
        Returns:
        maximum number of entries which the cache can hold
      • containsKey

        boolean containsKey​(KeyType key)
        Returns true if this map contains a mapping for the specified key.
        Parameters:
        key - The key whose presence in this map is to be tested
        Returns:
        true if this map contains a mapping for the specified key.