Class SessionAttribute<T>

  • Type Parameters:
    T - the type of the attribute

    public abstract class SessionAttribute<T>
    extends Object
    Provides a key for a session attribute and, optionally, an initial value
    • Constructor Detail

      • SessionAttribute

        protected SessionAttribute()
        Protected constructor
    • Method Detail

      • initialValue

        public T initialValue​(int partitionId)
        Returns the initial value for the given attribute
        Parameters:
        ctx - the context
        partitionId - the partition id
        Returns:
        the initial value for the given attribute
      • hashCode

        public int hashCode()
        By default two session attributes are considered equal if they have the same class
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(Object obj)
        By default two session attributes are considered equal if they have the same class
        Overrides:
        equals in class Object