Package 

Class RecurringRunnableExecutor

  • All Implemented Interfaces:
    java.util.concurrent.Executor

    
    public class RecurringRunnableExecutor
     implements Executor
                        

    Implements a single-threaded Executor of RecurringRunnables i.e. asynchronous tasks which determine by themselves the intervals (the lengths of which may vary) at which they are to be invoked. webrtc/modules/utility/interface/process_thread.h webrtc/modules/utility/source/process_thread_impl.cc webrtc/modules/utility/source/process_thread_impl.h

    • Constructor Detail

      • RecurringRunnableExecutor

        RecurringRunnableExecutor(String name)
        Initializes a new RecurringRunnableExecutor instance.
        Parameters:
        name - a string to be added to the name of the thread which thisinstance will start.
    • Method Detail

      • deRegisterRecurringRunnable

         boolean deRegisterRecurringRunnable(RecurringRunnable recurringRunnable)

        De-registers a {@code RecurringRunnable} from this {@code Executor} sothat its run is no longer invoked (bythis instance).

        Parameters:
        recurringRunnable - the {@code RecurringRunnable} tode-register from this instance
      • registerRecurringRunnable

         boolean registerRecurringRunnable(RecurringRunnable recurringRunnable)

        Registers a {@code RecurringRunnable} with this {@code Executor} sothat its run is invoked (by thisinstance).

        Parameters:
        recurringRunnable - the {@code RecurringRunnable} to registerwith this instance
      • startOrNotifyThread

         void startOrNotifyThread()

        Starts or notifies thread depending on and in accord with thestate of this instance.