@GwtIncompatible public final class ExecutionList extends Object
ListenableFutureimplementations to manage their listeners. An instance contains a list of listeners, each with an associated
Executor, and guarantees that every
Runnablethat is added will be executed after
execute()is called. Any
Runnableadded after the call to
executeis still guaranteed to execute. There is no guarantee, however, that listeners will be executed in the order that they are added.
Exceptions thrown by a listener will be propagated up to the executor. Any exception thrown
Executor.execute (e.g., a
RejectedExecutionException or an exception
thrown by direct execution) will be caught and logged.
|Constructor and Description|
Creates a new, empty
|Modifier and Type||Method and Description|
Runs this execution list, executing all existing pairs in the order they were added.
Executorto the list of listeners to execute. If execution has already begun, the listener is executed immediately.
When selecting an executor, note that
directExecutor is dangerous in some cases. See
the discussion in the
public void execute()
This method is idempotent. Calling it several times in parallel is semantically equivalent to calling it exactly once.
Copyright © 2010–2017. All rights reserved.