Class SerializedExecutor

java.lang.Object
org.eclipse.jetty.util.thread.SerializedExecutor
All Implemented Interfaces:
Executor

public class SerializedExecutor extends Object implements Executor
Ensures serial execution of submitted tasks.

An Executor that uses an internal SerializedInvoker to ensure that only one of the submitted tasks is running at any time.

  • Constructor Details

    • SerializedExecutor

      public SerializedExecutor()
    • SerializedExecutor

      public SerializedExecutor(Executor executor)
  • Method Details

    • onError

      protected void onError(Runnable task, Throwable t)
    • execute

      public void execute(Runnable task)
      Arrange for a task to be executed, mutually excluded from other tasks. This is equivalent to executing any Runnable returned from the internal SerializedInvoker.offer(Runnable) method.
      Specified by:
      execute in interface Executor
      Parameters:
      task - The task to invoke
    • execute

      public void execute(Runnable... tasks)
      Arrange for tasks to be executed, mutually excluded from other tasks. This is equivalent to executing any Runnable returned from the internal SerializedInvoker.offer(Runnable) method.
      Parameters:
      tasks - The tasks to invoke