Class SessionInfo
java.lang.Object
com.vaadin.kubernetes.starter.sessiontracker.backend.SessionInfo
Holder for serialized session attributes.
-
Constructor Summary
ConstructorsConstructorDescriptionSessionInfo(String clusterKey, byte[] data) Creates a newSessionInfofor the given distributed storage key.SessionInfo(String clusterKey, Duration timeToLive, byte[] data) Creates a newSessionInfofor the given distributed storage key. -
Method Summary
Modifier and TypeMethodDescriptionGets the distributed storage key.byte[]getData()Gets serialized session attributes in binary format.Gets the maximum amount of time an inactive session should be preserved in the backed.
-
Constructor Details
-
SessionInfo
Creates a newSessionInfofor the given distributed storage key.- Parameters:
clusterKey- the distributed storage key.data- serialized session attributes in binary format.
-
SessionInfo
Creates a newSessionInfofor 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
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
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.
-