java.lang.Object
com.vaadin.kubernetes.starter.sessiontracker.backend.SessionInfo

public class SessionInfo extends Object
Holder for serialized session attributes.
  • Constructor Details

    • SessionInfo

      public SessionInfo(String clusterKey, byte[] data)
      Creates a new SessionInfo for the given distributed storage key.
      Parameters:
      clusterKey - the distributed storage key.
      data - serialized session attributes in binary format.
    • SessionInfo

      public SessionInfo(String clusterKey, Duration timeToLive, byte[] data)
      Creates a new SessionInfo for the given distributed storage key.
      Parameters:
      clusterKey - the distributed storage key.
      timeToLive - the maximum amount of time an inactive session should be preserved in the backed. A zero or negative value means the session should not be evicted.
      data - serialized session attributes in binary format.
  • Method Details

    • getClusterKey

      public String getClusterKey()
      Gets the distributed storage key.
      Returns:
      the distributed storage key.
    • getData

      public byte[] getData()
      Gets serialized session attributes in binary format.
      Returns:
      the serialized session attributes in binary format
    • getTimeToLive

      public Duration getTimeToLive()
      Gets the maximum amount of time an inactive session should be preserved in the backed. A zero or negative value means the session should not be evicted.
      Returns:
      the session time to live.