Class ResettableDelayedAction

java.lang.Object
io.debezium.connector.spanner.task.utils.ResettableDelayedAction

public class ResettableDelayedAction extends Object
Executes action after specified delay, if this action will not be overridden by a new one. If during this delay, action is updated - old action, will be cancelled and time of the delay will be started again.
  • Field Details

    • timeOut

      private final Duration timeOut
    • thread

      private volatile Thread thread
    • name

      private final String name
  • Constructor Details

    • ResettableDelayedAction

      public ResettableDelayedAction(String name, Duration timeOut)
  • Method Details

    • set

      public void set(Runnable action)
    • clear

      public void clear()