public interface ServiceExecutor
close(Runnable) to block a service from stopping.| Modifier and Type | Method and Description |
|---|---|
void |
close(Runnable closeTask)
Closes the service, executing the specified task, first waiting for any concurrent executions to complete.
|
<E extends Exception> |
execute(org.wildfly.common.function.ExceptionRunnable<E> executeTask)
Executes the specified task, but only if the service was not already closed.
|
<R,E extends Exception> |
execute(org.wildfly.common.function.ExceptionSupplier<R,E> executeTask)
Executes the specified task, but only if the service was not already closed.
|
void |
execute(Runnable executeTask)
Executes the specified task, but only if the service was not already closed.
|
<R> Optional<R> |
execute(Supplier<R> executeTask)
Executes the specified task, but only if the service was not already closed.
|
void execute(Runnable executeTask)
executeTask - a task to execute<E extends Exception> void execute(org.wildfly.common.function.ExceptionRunnable<E> executeTask) throws E extends Exception
executeTask - a task to executeE - if the task execution failedE extends Exception<R> Optional<R> execute(Supplier<R> executeTask)
executeTask - a task to execute<R,E extends Exception> Optional<R> execute(org.wildfly.common.function.ExceptionSupplier<R,E> executeTask) throws E extends Exception
executeTask - a task to executeE - if the task execution failedE extends Exceptionvoid close(Runnable closeTask)
close(Runnable) invocations.closeTask - a task which closes the serviceCopyright © 2019 JBoss by Red Hat. All rights reserved.