Class StampedLockServiceExecutor
- java.lang.Object
-
- org.wildfly.clustering.service.concurrent.StampedLockServiceExecutor
-
- All Implemented Interfaces:
Executor,Executor,ServiceExecutor
@Deprecated(forRemoval=true) public class StampedLockServiceExecutor extends Object implements ServiceExecutor
Deprecated, for removal: This API element is subject to removal in a future version.To be removed without replacementServiceExecutorimplemented via aStampedLock.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description StampedLockServiceExecutor()Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose(Runnable closeTask)Deprecated, for removal: This API element is subject to removal in a future version.Closes the service, executing the specified task, first waiting for any concurrent executions to complete.voidexecute(Runnable executeTask)Deprecated, for removal: This API element is subject to removal in a future version.<R> Optional<R>execute(Supplier<R> executeTask)Deprecated, for removal: This API element is subject to removal in a future version.Executes the specified task, but only if the service was not already closed.<E extends Exception>
voidexecute(org.wildfly.common.function.ExceptionRunnable<E> executeTask)Deprecated, for removal: This API element is subject to removal in a future version.Executes the specified runner.<R,E extends Exception>
Optional<R>execute(org.wildfly.common.function.ExceptionSupplier<R,E> executeTask)Deprecated, for removal: This API element is subject to removal in a future version.Executes the specified task, but only if the service was not already closed.
-
-
-
Method Detail
-
execute
public void execute(Runnable executeTask)
Deprecated, for removal: This API element is subject to removal in a future version.
-
execute
public <E extends Exception> void execute(org.wildfly.common.function.ExceptionRunnable<E> executeTask) throws E extends Exception
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ExecutorExecutes the specified runner.
-
execute
public <R> Optional<R> execute(Supplier<R> executeTask)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ServiceExecutorExecutes the specified task, but only if the service was not already closed. If service is already closed, the task is not run. If executed, the specified task must return a non-null value, to be distinguishable from a non-execution.- Specified by:
executein interfaceServiceExecutor- Parameters:
executeTask- a task to execute- Returns:
- an optional value that is present only if the specified task was run.
-
execute
public <R,E extends Exception> Optional<R> execute(org.wildfly.common.function.ExceptionSupplier<R,E> executeTask) throws E extends Exception
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ServiceExecutorExecutes the specified task, but only if the service was not already closed. If service is already closed, the task is not run. If executed, the specified task must return a non-null value, to be distinguishable from a non-execution.- Specified by:
executein interfaceServiceExecutor- Parameters:
executeTask- a task to execute- Returns:
- an optional value that is present only if the specified task was run.
- Throws:
E- if the task execution failedE extends Exception
-
close
public void close(Runnable closeTask)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ServiceExecutorCloses the service, executing the specified task, first waiting for any concurrent executions to complete. The specified task will only execute once, irrespective on subsequentServiceExecutor.close(Runnable)invocations.- Specified by:
closein interfaceServiceExecutor- Parameters:
closeTask- a task which closes the service
-
-