Record Class JSentinelVersionKey
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.session.JSentinelVersionKey
- Record Components:
tenant- tenant scope;nullbecomesTenantId.DEFAULTsubjectId- subject identifier; non-null
@ExperimentalJSentinelApi
public record JSentinelVersionKey(TenantId tenant, SubjectId subjectId)
extends Record
Composite key under which
JSentinelVersionStore tracks the
current JSentinelVersion of a subject.
Tenant-aware: the same SubjectId can have an independent
version per tenant. A role change in one tenant must not invalidate
the subject's sessions in another tenant, which is what the planned
JSentinelVersionCheck interceptor relies on.
-
Constructor Summary
ConstructorsConstructorDescriptionJSentinelVersionKey(TenantId tenant, SubjectId subjectId) Validates the record components and normalises anulltenant toTenantId.DEFAULT. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thesubjectIdrecord component.tenant()Returns the value of thetenantrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JSentinelVersionKey
Validates the record components and normalises anulltenant toTenantId.DEFAULT.- Parameters:
tenant- tenant scope;nullbecomes DEFAULTsubjectId- non-null subject id
-
-
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). -
tenant
-
subjectId
-