Class OpOrder.Group
java.lang.Object
org.apache.cassandra.utils.concurrent.OpOrder.Group
- All Implemented Interfaces:
AutoCloseable,Comparable<OpOrder.Group>
- Enclosing class:
- OpOrder
public static final class OpOrder.Group
extends Object
implements Comparable<OpOrder.Group>, AutoCloseable
Represents a group of identically ordered operations, i.e. all operations started in the interval between
two barrier issuances. For each register() call this is returned, close() must be called exactly once.
It should be treated like taking a lock().
-
Method Summary
Modifier and TypeMethodDescriptionvoidawait()voidclose()To be called exactly once for each register() call this object is returned for, indicating the operation is completeintcompareTo(OpOrder.Group that) booleanbooleanbooleanvoidnotifyIfBlocking(WaitQueue.Signal signal) prev()
-
Method Details
-
close
public void close()To be called exactly once for each register() call this object is returned for, indicating the operation is complete- Specified by:
closein interfaceAutoCloseable
-
isFinished
public boolean isFinished() -
isOldestLiveGroup
public boolean isOldestLiveGroup() -
await
public void await() -
prev
-
isBlocking
public boolean isBlocking()- Returns:
- true if a barrier we are behind is, or may be, blocking general progress, so we should try more aggressively to progress
-
notifyIfBlocking
-
compareTo
- Specified by:
compareToin interfaceComparable<OpOrder.Group>
-