Record Class JSentinelVersionStatus.Drifted
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.session.JSentinelVersionStatus.Drifted
- Record Components:
snapshot- version captured when the session was openedcurrent- subject's current version at check time
- All Implemented Interfaces:
JSentinelVersionStatus
- Enclosing interface:
JSentinelVersionStatus
public static record JSentinelVersionStatus.Drifted(JSentinelVersion snapshot, JSentinelVersion current)
extends Record
implements JSentinelVersionStatus
Session has drifted — its snapshot differs from the subject's
stored version. Includes both values so callers (e.g. audit
sinks) can record the delta.
-
Nested Class Summary
Nested classes/interfaces inherited from interface JSentinelVersionStatus
JSentinelVersionStatus.Current, JSentinelVersionStatus.DriftedModifier and TypeInterfaceDescriptionstatic final recordSession is still current — its snapshot matches the subject's stored version.static final recordSession has drifted — its snapshot differs from the subject's stored version. -
Constructor Summary
ConstructorsConstructorDescriptionDrifted(JSentinelVersion snapshot, JSentinelVersion current) Validates the components and asserts they differ. -
Method Summary
Modifier and TypeMethodDescriptioncurrent()Returns the value of thecurrentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.snapshot()Returns the value of thesnapshotrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface JSentinelVersionStatus
isCurrent, isDrifted
-
Constructor Details
-
Drifted
Validates the components and asserts they differ.
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
snapshot
Returns the value of thesnapshotrecord component.- Specified by:
snapshotin interfaceJSentinelVersionStatus- Returns:
- the value of the
snapshotrecord component
-
current
Returns the value of thecurrentrecord component.- Specified by:
currentin interfaceJSentinelVersionStatus- Returns:
- the value of the
currentrecord component
-