public interface ArtemisExecutor extends Executor
Modifier and Type | Method and Description |
---|---|
static ArtemisExecutor |
delegate(Executor executor)
Artemis is supposed to implement this properly, however in tests or tools
this can be used as a fake, doing a simple delegate and using the default methods implemented here.
|
default boolean |
flush(long timeout,
TimeUnit unit)
To be used to flush an executor from a different thread.
|
default boolean |
isFlushed()
This will verify if the executor is flushed with no wait (or very minimal wait if not the
OrderedExecutor |
default void |
shutdown() |
default int |
shutdownNow()
It will wait the current execution (if there is one) to finish
but will not complete any further executions
|
default int |
shutdownNow(Consumer<? super Runnable> onPendingTask,
int timeout,
TimeUnit unit)
It will wait the current execution (if there is one) to finish
but will not complete any further executions.
|
static ArtemisExecutor delegate(Executor executor)
executor
- default int shutdownNow(Consumer<? super Runnable> onPendingTask, int timeout, TimeUnit unit)
onPendingTask
- it will be called for each pending task founddefault boolean flush(long timeout, TimeUnit unit)
timeout
- unit
- default int shutdownNow()
default void shutdown()
default boolean isFlushed()
OrderedExecutor
Copyright © 2021 JBoss by Red Hat. All rights reserved.