Class Debouncer<T>

java.lang.Object
com.inductiveautomation.ignition.gateway.util.Debouncer<T>

public abstract class Debouncer<T> extends Object
  • Constructor Details

    • Debouncer

      public Debouncer(ScheduledExecutorService scheduler, ExecutorService executor, long debounce, TimeUnit timeUnit)
      Parameters:
      scheduler - No blocking work will be done here
      executor - Expensive blocking work will be done here
      debounce - How long to wait between updates and doing the work
      timeUnit - The time unit of the debounce parameter
  • Method Details

    • process

      protected abstract void process(T input)
    • submit

      public void submit(T inputValue)
    • debounce

      public static <I> Debouncer.DebounceBuilder<I> debounce(Consumer<I> processor)