Record Class DocumentLocks
java.lang.Object
java.lang.Record
com.priint.pubserverapi.document.lock.DocumentLocks
- Record Components:
documentPointer- A set of values that identify a document system-wide.locks- Current locks issued for the document. Document is considered unlocked if this set is empty.
public record DocumentLocks(DocumentPointer documentPointer, Set<Lock> locks)
extends Record
implements Iterable<Lock>
A class representing document and current locks issued for it.
-
Constructor Summary
ConstructorsConstructorDescriptionDocumentLocks(DocumentPointer documentPointer, Set<Lock> locks) Creates an instance of aDocumentLocksrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedocumentPointerrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisLocked()booleaniterator()locks()Returns the value of thelocksrecord component.stream()final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DocumentLocks
Creates an instance of aDocumentLocksrecord class.- Parameters:
documentPointer- the value for thedocumentPointerrecord componentlocks- the value for thelocksrecord component
-
-
Method Details
-
iterator
-
stream
-
isLocked
public boolean isLocked() -
isUnlocked
public boolean isUnlocked() -
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). -
documentPointer
Returns the value of thedocumentPointerrecord component.- Returns:
- the value of the
documentPointerrecord component
-
locks
Returns the value of thelocksrecord component.- Returns:
- the value of the
locksrecord component
-