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 replacement
ServiceExecutor implemented via a StampedLock.- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated, 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.voidDeprecated, for removal: This API element is subject to removal in a future version.<R> Optional<R>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.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.
-
Constructor Details
-
StampedLockServiceExecutor
public StampedLockServiceExecutor()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
execute
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 Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ExecutorExecutes the specified runner. -
execute
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 EDeprecated, 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 failed
-
close
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
-