Interface SessionCachedContextProvider

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> void addItemToListCache​(java.lang.String cacheKey, T value)
      Add a value to a cached List.
      <K,​V>
      void
      addItemToMapCache​(java.lang.String cacheKey, K key, V value)
      Add an element to a cached Map
      <T> void addItemToSetCache​(java.lang.String cacheKey, T value)
      Add a value to a cached Set.
      void clearListCache​(java.lang.String cacheKey)
      Clear a list cache by its key.
      void clearMapCache​(java.lang.String cacheKey)
      Clear a map cache by its key.
      void clearSetCache​(java.lang.String cacheKey)
      Clear a set cache by its key.
      void createEmptyListCache​(java.lang.String cacheKey)
      Creates an empty cached List.
      <T> java.util.List<T> getAllItemsFromListCache​(java.lang.String cacheKey)
      Return a cached List.
      <K,​V>
      java.util.Map<K,​V>
      getAllItemsFromMapCache​(java.lang.String cacheKey)
      Returns a cached Map
      <T> java.util.Set<T> getAllItemsFromSetCache​(java.lang.String cacheKey)
      Return a cached Set.
      boolean hasCacheKey​(java.lang.String cacheKey)
      Checks if there's a cache with the given key.
      <T> void removeItemFromListCache​(java.lang.String cacheKey, T value)
      Remove element from a cached list.
      <K> void removeItemFromMapCache​(java.lang.String cacheKey, K key)
      Remove an element from a cached list
      <T> void removeItemFromSetCache​(java.lang.String cacheKey, T value)
      Remove element from a cached set.
    • Method Detail

      • addItemToSetCache

        <T> void addItemToSetCache​(java.lang.String cacheKey,
                                   T value)
        Add a value to a cached Set.
        Type Parameters:
        T - type of the value
        Parameters:
        cacheKey - the cache key to find a cached set
        value - the value to add to a cached set
      • getAllItemsFromSetCache

        <T> java.util.Set<T> getAllItemsFromSetCache​(java.lang.String cacheKey)
        Return a cached Set.
        Type Parameters:
        T - type of a set element
        Parameters:
        cacheKey - the cache key to find a cached set
        Returns:
        the cached Set.
      • removeItemFromSetCache

        <T> void removeItemFromSetCache​(java.lang.String cacheKey,
                                        T value)
        Remove element from a cached set.
        Type Parameters:
        T - type of the value
        Parameters:
        cacheKey - the cache key to find a cached set
        value - the value to remove from a cached set
      • clearSetCache

        void clearSetCache​(java.lang.String cacheKey)
        Clear a set cache by its key.
        Parameters:
        cacheKey - the cache key
      • addItemToListCache

        <T> void addItemToListCache​(java.lang.String cacheKey,
                                    T value)
        Add a value to a cached List.
        Type Parameters:
        T - type of the value
        Parameters:
        cacheKey - the cache key to find a cached list
        value - the value to add to a cached list
      • createEmptyListCache

        void createEmptyListCache​(java.lang.String cacheKey)
        Creates an empty cached List.
        Parameters:
        cacheKey - the cache key
      • getAllItemsFromListCache

        <T> java.util.List<T> getAllItemsFromListCache​(java.lang.String cacheKey)
        Return a cached List.
        Type Parameters:
        T - type of a list element
        Parameters:
        cacheKey - the cache key to find a cached list
        Returns:
        the cached List.
        Throws:
        java.lang.IllegalStateException - if cacheKey does not exist
      • removeItemFromListCache

        <T> void removeItemFromListCache​(java.lang.String cacheKey,
                                         T value)
        Remove element from a cached list.
        Type Parameters:
        T - type of the value
        Parameters:
        cacheKey - the cache key to find a cached list
        value - the value to remove from a cached list
        Throws:
        java.lang.IllegalStateException - if cacheKey does not exist
      • clearListCache

        void clearListCache​(java.lang.String cacheKey)
        Clear a list cache by its key.
        Parameters:
        cacheKey - the cache key
        Throws:
        java.lang.IllegalStateException - if cacheKey does not exist
      • addItemToMapCache

        <K,​V> void addItemToMapCache​(java.lang.String cacheKey,
                                           K key,
                                           V value)
        Add an element to a cached Map
        Type Parameters:
        K - type of the key
        V - type of the value
        Parameters:
        cacheKey - the cache key to find a cached map
        key - the key for the value
        value - the value
      • getAllItemsFromMapCache

        <K,​V> java.util.Map<K,​V> getAllItemsFromMapCache​(java.lang.String cacheKey)
        Returns a cached Map
        Type Parameters:
        K - type of the key
        V - type of the value
        Parameters:
        cacheKey - the cache key to find a cached map
        Returns:
        the Map
        Throws:
        java.lang.IllegalStateException - if cacheKey does not exist
      • removeItemFromMapCache

        <K> void removeItemFromMapCache​(java.lang.String cacheKey,
                                        K key)
        Remove an element from a cached list
        Type Parameters:
        K - type of the key
        Parameters:
        cacheKey - the cache key to find a cached map
        key - the key to remove
        Throws:
        java.lang.IllegalStateException - if cacheKey does not exist
      • clearMapCache

        void clearMapCache​(java.lang.String cacheKey)
        Clear a map cache by its key.
        Parameters:
        cacheKey - the cache key
        Throws:
        java.lang.IllegalStateException - if cacheKey does not exist
      • hasCacheKey

        boolean hasCacheKey​(java.lang.String cacheKey)
        Checks if there's a cache with the given key.
        Parameters:
        cacheKey - the cache key
        Returns:
        true if there's a cache with the given key. false otherwise.