java.lang.Object
org.eclipse.jetty.util.thread.SerializedInvoker
Ensures serial invocation of submitted tasks.
The Invocable.InvocationType of the Runnable returned from this class is
always Invocable.InvocationType.BLOCKING since a blocking task may be added to the queue
at any time.
This class was inspired by the public domain class NonBlockingMutexExecutor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringderiveTaskName(Runnable task) Arrange for a task to be invoked, mutually excluded from other tasks.Arrange for tasks to be invoked, mutually excluded from other tasks.protected voidvoidArrange for a task to be run, mutually excluded from other tasks.voidArrange for tasks to be executed, mutually excluded from other tasks.toString()
-
Constructor Details
-
SerializedInvoker
public SerializedInvoker()
-
-
Method Details
-
offer
-
deriveTaskName
-
offer
-
run
Arrange for a task to be run, mutually excluded from other tasks. This is equivalent to directly running anyRunnablereturned fromoffer(Runnable)- Parameters:
task- The task to invoke
-
run
Arrange for tasks to be executed, mutually excluded from other tasks. This is equivalent to directly running anyRunnablereturned fromoffer(Runnable...)- Parameters:
tasks- The tasks to invoke
-
toString
-
onError
-