Class SerializingExecutor

java.lang.Object
org.apache.dubbo.common.threadpool.serial.SerializingExecutor
All Implemented Interfaces:
Runnable, Executor

public final class SerializingExecutor extends Object implements Executor, Runnable
Executor ensuring that all Runnable tasks submitted are executed in order using the provided Executor, and serially such that no two will ever be running at the same time.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a SerializingExecutor, running tasks using executor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Runs the given runnable strictly after all Runnables that were submitted before it, and using the executor passed to the constructor. .
    void
    run()
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SerializingExecutor

      public SerializingExecutor(Executor executor)
      Creates a SerializingExecutor, running tasks using executor.
      Parameters:
      executor - Executor in which tasks should be run. Must not be null.
  • Method Details

    • execute

      public void execute(Runnable r)
      Runs the given runnable strictly after all Runnables that were submitted before it, and using the executor passed to the constructor. .
      Specified by:
      execute in interface Executor
    • run

      public void run()
      Specified by:
      run in interface Runnable