Package io.trino.operator
Class DriverYieldSignal
java.lang.Object
io.trino.operator.DriverYieldSignal
Methods setWithDelay and reset should be used in pairs;
usually follow the following idiom:
DriverYieldSignal signal = ...;
signal.setWithDelay(duration, executor);
try {
// block
} finally {
signal.reset();
}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanisSet()voidreset()voidvoidsetWithDelay(long maxRunNanos, ScheduledExecutorService executor) toString()voidSignals an immediate yield to the driver to improve responsiveness to termination commands that may arrive while drivers are still running.
-
Constructor Details
-
DriverYieldSignal
public DriverYieldSignal()
-
-
Method Details
-
setWithDelay
-
reset
public void reset() -
isSet
public boolean isSet() -
yieldImmediatelyForTermination
public void yieldImmediatelyForTermination()Signals an immediate yield to the driver to improve responsiveness to termination commands that may arrive while drivers are still running. After calling this method, the driver should not attempt to start another interval of running and attempting to callsetWithDelay(long, ScheduledExecutorService)will fail. -
toString
-
forceYieldForTesting
public void forceYieldForTesting() -
resetYieldForTesting
public void resetYieldForTesting()
-