Record Class ProcessLockOrException
java.lang.Object
java.lang.Record
com.kingsrook.qqq.backend.core.processes.locks.ProcessLockOrException
public record ProcessLockOrException(ProcessLock processLock, UnableToObtainProcessLockException unableToObtainProcessLockException)
extends Record
Record to hold either a processLock, or an unableToObtainProcessLockException.
Used as return value from bulk-methods in ProcessLockUtils (where some
requested keys may succeed and return a lock, and others may fail
and return the exception).
-
Constructor Summary
ConstructorsConstructorDescriptionProcessLockOrException
(ProcessLock processLock) ConstructorProcessLockOrException
(ProcessLock processLock, UnableToObtainProcessLockException unableToObtainProcessLockException) Creates an instance of aProcessLockOrException
record class.ProcessLockOrException
(UnableToObtainProcessLockException unableToObtainProcessLockException) Constructor -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theprocessLock
record component.final String
toString()
Returns a string representation of this record class.Returns the value of theunableToObtainProcessLockException
record component.
-
Constructor Details
-
ProcessLockOrException
Constructor -
ProcessLockOrException
public ProcessLockOrException(UnableToObtainProcessLockException unableToObtainProcessLockException) Constructor -
ProcessLockOrException
public ProcessLockOrException(ProcessLock processLock, UnableToObtainProcessLockException unableToObtainProcessLockException) Creates an instance of aProcessLockOrException
record class.- Parameters:
processLock
- the value for theprocessLock
record componentunableToObtainProcessLockException
- the value for theunableToObtainProcessLockException
record 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. All components in this record class are compared withObjects::equals(Object,Object)
. -
processLock
Returns the value of theprocessLock
record component.- Returns:
- the value of the
processLock
record component
-
unableToObtainProcessLockException
Returns the value of theunableToObtainProcessLockException
record component.- Returns:
- the value of the
unableToObtainProcessLockException
record component
-