public interface ConcurrencyService
Runnable
and Callable
Modifier and Type | Method and Description |
---|---|
<R extends java.lang.Runnable> |
spinOneThreadAndDoNotWaitForCompletion(R task)
Handles the passed in
Runnable concurrently. |
<T,C extends java.util.concurrent.Callable<T>> |
spinOneThreadAndDoNotWaitForResult(C task)
Handles the passed in taskList concurrently.
|
<R extends java.lang.Runnable> |
spinThreadsAndDoNotWaitForCompletion(java.util.List<R> taskList)
Handles the passed in
List <Runnable > concurrently. |
<T,C extends java.util.concurrent.Callable<T>> |
spinThreadsAndDoNotWaitForResult(java.util.List<C> taskList)
Handles the passed in taskList concurrently.
|
<R extends java.lang.Runnable> |
spinThreadsAndWaitForCompletion(java.util.List<R> taskList)
Handles the passed in
List <Runnable > concurrently. |
<T,C extends java.util.concurrent.Callable<T>> |
spinThreadsAndWaitForResult(java.util.List<C> taskList)
Handles the passed in taskList concurrently, and returns the result.
|
<T,C extends java.util.concurrent.Callable<T>> void spinOneThreadAndDoNotWaitForResult(C task)
Callable
.C
- type of Callable being calledT
- result of Callable being passedtask
- the task to run<T,C extends java.util.concurrent.Callable<T>> java.util.List<T> spinThreadsAndWaitForResult(java.util.List<C> taskList)
C
- type of Callable being calledT
- result of Callable being passedtaskList
- list of tasks to run<T,C extends java.util.concurrent.Callable<T>> void spinThreadsAndDoNotWaitForResult(java.util.List<C> taskList)
List
C
- type of Callable being calledT
- result of Callable being passedtaskList
- list of tasks to run<R extends java.lang.Runnable> void spinOneThreadAndDoNotWaitForCompletion(R task)
Runnable
concurrently. There is no guarantee this method will execute before subsequent client code.
This method is appropriate when client code is not depending on the passed in Runnable
being completed.R
- type of Runnable being calledtask
- the task to run<R extends java.lang.Runnable> void spinThreadsAndWaitForCompletion(java.util.List<R> taskList)
List
<Runnable
> concurrently. There is no guarantee this method will execute before
subsequent client code. This method is appropriate when client code is depending on the passed in Runnable
s being completed.R
- type of Runnable being calledtaskList
- the list of tasks to run<R extends java.lang.Runnable> void spinThreadsAndDoNotWaitForCompletion(java.util.List<R> taskList)
List
<Runnable
> concurrently. There is no guarantee this method will execute before
subsequent client code. This method is appropriate when client code is not depending on the passed in Runnable
s being completed.R
- type of Runnable being calledtaskList
- the list of tasks to run