Record Class SessionManager.SessionSnapshot
java.lang.Object
java.lang.Record
com.loomcache.server.cp.SessionManager.SessionSnapshot
- Enclosing class:
SessionManager
public static record SessionManager.SessionSnapshot(String sessionId, String ownerId, long createdAt, long lastHeartbeat, SessionState state)
extends Record
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionSessionSnapshot(String sessionId, String ownerId, long createdAt, long lastHeartbeat, SessionState state) Creates an instance of aSessionSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thecreatedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of thelastHeartbeatrecord component.ownerId()Returns the value of theownerIdrecord component.Returns the value of thesessionIdrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SessionSnapshot
public SessionSnapshot(String sessionId, String ownerId, long createdAt, long lastHeartbeat, SessionState state) Creates an instance of aSessionSnapshotrecord class.- Parameters:
sessionId- the value for thesessionIdrecord componentownerId- the value for theownerIdrecord componentcreatedAt- the value for thecreatedAtrecord componentlastHeartbeat- the value for thelastHeartbeatrecord componentstate- the value for thestaterecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
sessionId
Returns the value of thesessionIdrecord component.- Returns:
- the value of the
sessionIdrecord component
-
ownerId
Returns the value of theownerIdrecord component.- Returns:
- the value of the
ownerIdrecord component
-
createdAt
public long createdAt()Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-
lastHeartbeat
public long lastHeartbeat()Returns the value of thelastHeartbeatrecord component.- Returns:
- the value of the
lastHeartbeatrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-