Class CacheItem<T>

  • Type Parameters:
    T - the value type.

    public class CacheItem<T>
    extends java.lang.Object
    Represents a single entry in a PortalCache.
    Since:
    10.0.0
    Version:
    $Revision: 19766 $ $Date: 2017-01-05 18:35:09 -0200 (Thu, 05 Jan 2017) $
    • Constructor Summary

      Constructors 
      Constructor Description
      CacheItem​(java.lang.String key, T value, java.lang.String... groups)
      Creates a new cache item.
      CacheItem​(java.lang.String key, T value, java.util.Set<java.lang.String> groups)
      Creates a new cache item.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<java.lang.String> getGroups()
      Returns the groups of this cache item.
      java.lang.String getKey()
      Returns the key of this cache item.
      T getValue()
      Returns the value of this cache item.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CacheItem

        public CacheItem​(java.lang.String key,
                         T value,
                         java.lang.String... groups)
        Creates a new cache item.
        Parameters:
        key - the key.
        value - the value.
        groups - the groups.
        Since:
        10.0.0
      • CacheItem

        public CacheItem​(java.lang.String key,
                         T value,
                         java.util.Set<java.lang.String> groups)
        Creates a new cache item.
        Parameters:
        key - the key.
        value - the value.
        groups - the groups.
        Since:
        10.0.0
    • Method Detail

      • getKey

        public java.lang.String getKey()
        Returns the key of this cache item.
        Returns:
        the key.
        Since:
        10.0.0
      • getValue

        public T getValue()
        Returns the value of this cache item.
        Returns:
        the value.
        Since:
        10.0.0
      • getGroups

        public java.util.Set<java.lang.String> getGroups()
        Returns the groups of this cache item.
        Returns:
        the groups.
        Since:
        10.0.0
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object