Class Debouncer<T>


  • public abstract class Debouncer<T>
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Debouncer​(java.util.concurrent.ScheduledExecutorService scheduler, java.util.concurrent.ExecutorService executor, long debounce, java.util.concurrent.TimeUnit timeUnit)  
    • Constructor Detail

      • Debouncer

        public Debouncer​(java.util.concurrent.ScheduledExecutorService scheduler,
                         java.util.concurrent.ExecutorService executor,
                         long debounce,
                         java.util.concurrent.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 Detail

      • process

        protected abstract void process​(T input)
      • submit

        public void submit​(T inputValue)