Package com.priint.pubserverapi.document
Record Class CheckOutCommand.AcquireLock
java.lang.Object
java.lang.Record
com.priint.pubserverapi.document.CheckOutCommand.AcquireLock
- All Implemented Interfaces:
CheckOutCommand.LockingMethod
- Enclosing class:
CheckOutCommand
public static record CheckOutCommand.AcquireLock(Lock.Holder lockHolder, String acquiringSessionId)
extends Record
implements CheckOutCommand.LockingMethod
-
Constructor Summary
ConstructorsConstructorDescriptionAcquireLock(Lock.Holder lockHolder, String acquiringSessionId) Creates an instance of aAcquireLockrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theacquiringSessionIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelockHolderrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AcquireLock
Creates an instance of aAcquireLockrecord class.- Parameters:
lockHolder- the value for thelockHolderrecord componentacquiringSessionId- the value for theacquiringSessionIdrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
lockHolder
Returns the value of thelockHolderrecord component.- Returns:
- the value of the
lockHolderrecord component
-
acquiringSessionId
Returns the value of theacquiringSessionIdrecord component.- Returns:
- the value of the
acquiringSessionIdrecord component
-