Class DriverYieldSignal

java.lang.Object
io.trino.operator.DriverYieldSignal

@ThreadSafe public class DriverYieldSignal extends Object
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 Details

    • DriverYieldSignal

      public DriverYieldSignal()
  • Method Details

    • setWithDelay

      public void setWithDelay(long maxRunNanos, ScheduledExecutorService executor)
    • 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 call setWithDelay(long, ScheduledExecutorService) will fail.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • forceYieldForTesting

      public void forceYieldForTesting()
    • resetYieldForTesting

      public void resetYieldForTesting()