public interface ServiceExecutor extends Executor
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.
|
<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.
|
<R> Optional<R> |
execute(Supplier<R> executeTask)
Executes the specified task, but only if the service was not already closed.
|
<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 © 2021 JBoss by Red Hat. All rights reserved.