Record Class LinearizableLock.LockSnapshot
java.lang.Object
java.lang.Record
com.loomcache.server.cp.LinearizableLock.LockSnapshot
- Enclosing class:
LinearizableLock
-
Constructor Summary
ConstructorsConstructorDescriptionLockSnapshot(boolean isLocked, long fence, @Nullable String holderSessionId, int holdCount) Creates an instance of aLockSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longfence()Returns the value of thefencerecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theholdCountrecord component.@Nullable StringReturns the value of theholderSessionIdrecord component.booleanisLocked()Returns the value of theisLockedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LockSnapshot
Creates an instance of aLockSnapshotrecord class.- Parameters:
isLocked- the value for theisLockedrecord componentfence- the value for thefencerecord componentholderSessionId- the value for theholderSessionIdrecord componentholdCount- the value for theholdCountrecord 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. -
isLocked
public boolean isLocked()Returns the value of theisLockedrecord component.- Returns:
- the value of the
isLockedrecord component
-
fence
public long fence()Returns the value of thefencerecord component.- Returns:
- the value of the
fencerecord component
-
holderSessionId
Returns the value of theholderSessionIdrecord component.- Returns:
- the value of the
holderSessionIdrecord component
-
holdCount
public int holdCount()Returns the value of theholdCountrecord component.- Returns:
- the value of the
holdCountrecord component
-