Top Description Inners Fields Constructors Methods
org.eclipse.jetty.util.thread

public Class SerializedExecutor

extends Object
implements Executor
Class Inheritance
All Implemented Interfaces
java.util.concurrent.Executor
Imports
java.util.concurrent.Executor, java.util.function.Consumer, org.slf4j.LoggerFactory

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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
SerializedExecutor.ErrorHandlingTask

Error handling task

If a submitted task implements this interface, it will be passed any exceptions thrown when running the task.

Field Summary

Modifier and TypeField and Description
private final Executor
private final SerializedInvoker

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
execute(Runnable
The task to invoke
task
)

Implements java.util.concurrent.Executor.execute.

Arrange for a task to be executed, mutually excluded from other tasks.
public void
execute(Runnable...
The tasks to invoke
tasks
)

Arrange for tasks to be executed, mutually excluded from other tasks.

protected void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_executorback to summary
private final Executor _executor
_invokerback to summary
private final SerializedInvoker _invoker

Constructor Detail

SerializedExecutorback to summary
public SerializedExecutor()
SerializedExecutorback to summary
public SerializedExecutor(Executor executor)

Method Detail

executeback to summary
public void execute(Runnable task)

Implements java.util.concurrent.Executor.execute.

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.

Parameters
task:Runnable

The task to invoke

Annotations
@Override
executeback to summary
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:Runnable[]

The tasks to invoke

onErrorback to summary
protected void onError(Runnable task, Throwable t)
org.eclipse.jetty.util.thread back to summary

public Interface SerializedExecutor.ErrorHandlingTask

extends Runnable, Consumer<Throwable>

Error handling task

If a submitted task implements this interface, it will be passed any exceptions thrown when running the task.

Method Summary

Inherited from java.lang.Runnable:
run
Inherited from java.util.function.Consumer:
acceptandThen