Class StampedLockServiceExecutor
- java.lang.Object
-
- org.wildfly.clustering.service.concurrent.StampedLockServiceExecutor
-
- All Implemented Interfaces:
Executor,Executor,ServiceExecutor
@Deprecated public class StampedLockServiceExecutor extends Object implements ServiceExecutor
Deprecated.To be removed without replacementServiceExecutorimplemented via aStampedLock.- Author:
- Paul Ferraro
-
-
Constructor Summary
Constructors Constructor Description StampedLockServiceExecutor()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclose(Runnable closeTask)Deprecated.Closes the service, executing the specified task, first waiting for any concurrent executions to complete.voidexecute(Runnable executeTask)Deprecated.<R> Optional<R>execute(Supplier<R> executeTask)Deprecated.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.Executes the specified runner.<R,E extends Exception>
Optional<R>execute(org.wildfly.common.function.ExceptionSupplier<R,E> executeTask)Deprecated.Executes the specified task, but only if the service was not already closed.
-
-
-
Method Detail
-
execute
public void execute(Runnable executeTask)
Deprecated.
-
execute
public <E extends Exception> void execute(org.wildfly.common.function.ExceptionRunnable<E> executeTask) throws E extends Exception
Deprecated.Description copied from interface:ExecutorExecutes the specified runner.
-
execute
public <R> Optional<R> execute(Supplier<R> executeTask)
Deprecated.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.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.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
-
-