public class FoxBaseThreadUtils
extends java.lang.Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
FoxBaseThreadUtils.SimpleTask<T> |
static class |
FoxBaseThreadUtils.Task<T> |
| 构造器和说明 |
|---|
FoxBaseThreadUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
cancel(java.util.concurrent.ExecutorService executorService)
Cancel the tasks in pool.
|
static void |
cancel(FoxBaseThreadUtils.Task... tasks)
Cancel the given tasks.
|
static void |
cancel(FoxBaseThreadUtils.Task task)
Cancel the given task.
|
static void |
cancel(java.util.List<FoxBaseThreadUtils.Task> tasks)
Cancel the given tasks.
|
static <T> void |
executeByCached(FoxBaseThreadUtils.Task<T> task)
Executes the given task in a cached thread pool.
|
static <T> void |
executeByCached(FoxBaseThreadUtils.Task<T> task,
int priority)
Executes the given task in a cached thread pool.
|
static <T> void |
executeByCachedAtFixRate(FoxBaseThreadUtils.Task<T> task,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
Executes the given task in a cached thread pool at fix rate.
|
static <T> void |
executeByCachedAtFixRate(FoxBaseThreadUtils.Task<T> task,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit,
int priority)
Executes the given task in a cached thread pool at fix rate.
|
static <T> void |
executeByCachedAtFixRate(FoxBaseThreadUtils.Task<T> task,
long period,
java.util.concurrent.TimeUnit unit)
Executes the given task in a cached thread pool at fix rate.
|
static <T> void |
executeByCachedAtFixRate(FoxBaseThreadUtils.Task<T> task,
long period,
java.util.concurrent.TimeUnit unit,
int priority)
Executes the given task in a cached thread pool at fix rate.
|
static <T> void |
executeByCachedWithDelay(FoxBaseThreadUtils.Task<T> task,
long delay,
java.util.concurrent.TimeUnit unit)
Executes the given task in a cached thread pool after the given delay.
|
static <T> void |
executeByCachedWithDelay(FoxBaseThreadUtils.Task<T> task,
long delay,
java.util.concurrent.TimeUnit unit,
int priority)
Executes the given task in a cached thread pool after the given delay.
|
static <T> void |
executeByCpu(FoxBaseThreadUtils.Task<T> task)
Executes the given task in a cpu thread pool.
|
static <T> void |
executeByCpu(FoxBaseThreadUtils.Task<T> task,
int priority)
Executes the given task in a cpu thread pool.
|
static <T> void |
executeByCpuAtFixRate(FoxBaseThreadUtils.Task<T> task,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
Executes the given task in a cpu thread pool at fix rate.
|
static <T> void |
executeByCpuAtFixRate(FoxBaseThreadUtils.Task<T> task,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit,
int priority)
Executes the given task in a cpu thread pool at fix rate.
|
static <T> void |
executeByCpuAtFixRate(FoxBaseThreadUtils.Task<T> task,
long period,
java.util.concurrent.TimeUnit unit)
Executes the given task in a cpu thread pool at fix rate.
|
static <T> void |
executeByCpuAtFixRate(FoxBaseThreadUtils.Task<T> task,
long period,
java.util.concurrent.TimeUnit unit,
int priority)
Executes the given task in a cpu thread pool at fix rate.
|
static <T> void |
executeByCpuWithDelay(FoxBaseThreadUtils.Task<T> task,
long delay,
java.util.concurrent.TimeUnit unit)
Executes the given task in a cpu thread pool after the given delay.
|
static <T> void |
executeByCpuWithDelay(FoxBaseThreadUtils.Task<T> task,
long delay,
java.util.concurrent.TimeUnit unit,
int priority)
Executes the given task in a cpu thread pool after the given delay.
|
static <T> void |
executeByCustom(java.util.concurrent.ExecutorService pool,
FoxBaseThreadUtils.Task<T> task)
Executes the given task in a custom thread pool.
|
static <T> void |
executeByCustomAtFixRate(java.util.concurrent.ExecutorService pool,
FoxBaseThreadUtils.Task<T> task,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
Executes the given task in a custom thread pool at fix rate.
|
static <T> void |
executeByCustomAtFixRate(java.util.concurrent.ExecutorService pool,
FoxBaseThreadUtils.Task<T> task,
long period,
java.util.concurrent.TimeUnit unit)
Executes the given task in a custom thread pool at fix rate.
|
static <T> void |
executeByCustomWithDelay(java.util.concurrent.ExecutorService pool,
FoxBaseThreadUtils.Task<T> task,
long delay,
java.util.concurrent.TimeUnit unit)
Executes the given task in a custom thread pool after the given delay.
|
static <T> void |
executeByFixed(int size,
FoxBaseThreadUtils.Task<T> task)
Executes the given task in a fixed thread pool.
|
static <T> void |
executeByFixed(int size,
FoxBaseThreadUtils.Task<T> task,
int priority)
Executes the given task in a fixed thread pool.
|
static <T> void |
executeByFixedAtFixRate(int size,
FoxBaseThreadUtils.Task<T> task,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
Executes the given task in a fixed thread pool at fix rate.
|
static <T> void |
executeByFixedAtFixRate(int size,
FoxBaseThreadUtils.Task<T> task,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit,
int priority)
Executes the given task in a fixed thread pool at fix rate.
|
static <T> void |
executeByFixedAtFixRate(int size,
FoxBaseThreadUtils.Task<T> task,
long period,
java.util.concurrent.TimeUnit unit)
Executes the given task in a fixed thread pool at fix rate.
|
static <T> void |
executeByFixedAtFixRate(int size,
FoxBaseThreadUtils.Task<T> task,
long period,
java.util.concurrent.TimeUnit unit,
int priority)
Executes the given task in a fixed thread pool at fix rate.
|
static <T> void |
executeByFixedWithDelay(int size,
FoxBaseThreadUtils.Task<T> task,
long delay,
java.util.concurrent.TimeUnit unit)
Executes the given task in a fixed thread pool after the given delay.
|
static <T> void |
executeByFixedWithDelay(int size,
FoxBaseThreadUtils.Task<T> task,
long delay,
java.util.concurrent.TimeUnit unit,
int priority)
Executes the given task in a fixed thread pool after the given delay.
|
static <T> void |
executeByIo(FoxBaseThreadUtils.Task<T> task)
Executes the given task in an IO thread pool.
|
static <T> void |
executeByIo(FoxBaseThreadUtils.Task<T> task,
int priority)
Executes the given task in an IO thread pool.
|
static <T> void |
executeByIoAtFixRate(FoxBaseThreadUtils.Task<T> task,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
Executes the given task in an IO thread pool at fix rate.
|
static <T> void |
executeByIoAtFixRate(FoxBaseThreadUtils.Task<T> task,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit,
int priority)
Executes the given task in an IO thread pool at fix rate.
|
static <T> void |
executeByIoAtFixRate(FoxBaseThreadUtils.Task<T> task,
long period,
java.util.concurrent.TimeUnit unit)
Executes the given task in an IO thread pool at fix rate.
|
static <T> void |
executeByIoAtFixRate(FoxBaseThreadUtils.Task<T> task,
long period,
java.util.concurrent.TimeUnit unit,
int priority)
Executes the given task in an IO thread pool at fix rate.
|
static <T> void |
executeByIoWithDelay(FoxBaseThreadUtils.Task<T> task,
long delay,
java.util.concurrent.TimeUnit unit)
Executes the given task in an IO thread pool after the given delay.
|
static <T> void |
executeByIoWithDelay(FoxBaseThreadUtils.Task<T> task,
long delay,
java.util.concurrent.TimeUnit unit,
int priority)
Executes the given task in an IO thread pool after the given delay.
|
static <T> void |
executeBySingle(FoxBaseThreadUtils.Task<T> task)
Executes the given task in a single thread pool.
|
static <T> void |
executeBySingle(FoxBaseThreadUtils.Task<T> task,
int priority)
Executes the given task in a single thread pool.
|
static <T> void |
executeBySingleAtFixRate(FoxBaseThreadUtils.Task<T> task,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
Executes the given task in a single thread pool at fix rate.
|
static <T> void |
executeBySingleAtFixRate(FoxBaseThreadUtils.Task<T> task,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit,
int priority)
Executes the given task in a single thread pool at fix rate.
|
static <T> void |
executeBySingleAtFixRate(FoxBaseThreadUtils.Task<T> task,
long period,
java.util.concurrent.TimeUnit unit)
Executes the given task in a single thread pool at fix rate.
|
static <T> void |
executeBySingleAtFixRate(FoxBaseThreadUtils.Task<T> task,
long period,
java.util.concurrent.TimeUnit unit,
int priority)
Executes the given task in a single thread pool at fix rate.
|
static <T> void |
executeBySingleWithDelay(FoxBaseThreadUtils.Task<T> task,
long delay,
java.util.concurrent.TimeUnit unit)
Executes the given task in a single thread pool after the given delay.
|
static <T> void |
executeBySingleWithDelay(FoxBaseThreadUtils.Task<T> task,
long delay,
java.util.concurrent.TimeUnit unit,
int priority)
Executes the given task in a single thread pool after the given delay.
|
static java.util.concurrent.ExecutorService |
getCachedPool()
Return a thread pool that creates new threads as needed, but
will reuse previously constructed threads when they are
available.
|
static java.util.concurrent.ExecutorService |
getCachedPool(int priority)
Return a thread pool that creates new threads as needed, but
will reuse previously constructed threads when they are
available.
|
static java.util.concurrent.ExecutorService |
getCpuPool()
Return a thread pool that creates (CPU_COUNT + 1) threads
operating off a queue which size is 128 and the maximum
number of threads equals (2 * CPU_COUNT + 1).
|
static java.util.concurrent.ExecutorService |
getCpuPool(int priority)
Return a thread pool that creates (CPU_COUNT + 1) threads
operating off a queue which size is 128 and the maximum
number of threads equals (2 * CPU_COUNT + 1).
|
static java.util.concurrent.ExecutorService |
getFixedPool(int size)
Return a thread pool that reuses a fixed number of threads
operating off a shared unbounded queue, using the provided
ThreadFactory to create new threads when needed.
|
static java.util.concurrent.ExecutorService |
getFixedPool(int size,
int priority)
Return a thread pool that reuses a fixed number of threads
operating off a shared unbounded queue, using the provided
ThreadFactory to create new threads when needed.
|
static java.util.concurrent.ExecutorService |
getIoPool()
Return a thread pool that creates (2 * CPU_COUNT + 1) threads
operating off a queue which size is 128.
|
static java.util.concurrent.ExecutorService |
getIoPool(int priority)
Return a thread pool that creates (2 * CPU_COUNT + 1) threads
operating off a queue which size is 128.
|
static java.util.concurrent.ExecutorService |
getSinglePool()
Return a thread pool that uses a single worker thread operating
off an unbounded queue, and uses the provided ThreadFactory to
create a new thread when needed.
|
static java.util.concurrent.ExecutorService |
getSinglePool(int priority)
Return a thread pool that uses a single worker thread operating
off an unbounded queue, and uses the provided ThreadFactory to
create a new thread when needed.
|
static boolean |
isMainThread()
Return whether the thread is the main thread.
|
static void |
setDeliver(java.util.concurrent.Executor deliver)
Set the deliver.
|
public static boolean isMainThread()
true: yesfalse: nopublic static java.util.concurrent.ExecutorService getFixedPool(int size)
size - The size of thread in the pool.public static java.util.concurrent.ExecutorService getFixedPool(int size,
int priority)
size - The size of thread in the pool.priority - The priority of thread in the poll.public static java.util.concurrent.ExecutorService getSinglePool()
public static java.util.concurrent.ExecutorService getSinglePool(int priority)
priority - The priority of thread in the poll.public static java.util.concurrent.ExecutorService getCachedPool()
public static java.util.concurrent.ExecutorService getCachedPool(int priority)
priority - The priority of thread in the poll.public static java.util.concurrent.ExecutorService getIoPool()
public static java.util.concurrent.ExecutorService getIoPool(int priority)
priority - The priority of thread in the poll.public static java.util.concurrent.ExecutorService getCpuPool()
public static java.util.concurrent.ExecutorService getCpuPool(int priority)
priority - The priority of thread in the poll.public static <T> void executeByFixed(int size,
FoxBaseThreadUtils.Task<T> task)
T - The type of the task's result.size - The size of thread in the fixed thread pool.task - The task to execute.public static <T> void executeByFixed(int size,
FoxBaseThreadUtils.Task<T> task,
int priority)
T - The type of the task's result.size - The size of thread in the fixed thread pool.task - The task to execute.priority - The priority of thread in the poll.public static <T> void executeByFixedWithDelay(int size,
FoxBaseThreadUtils.Task<T> task,
long delay,
java.util.concurrent.TimeUnit unit)
T - The type of the task's result.size - The size of thread in the fixed thread pool.task - The task to execute.delay - The time from now to delay execution.unit - The time unit of the delay parameter.public static <T> void executeByFixedWithDelay(int size,
FoxBaseThreadUtils.Task<T> task,
long delay,
java.util.concurrent.TimeUnit unit,
int priority)
T - The type of the task's result.size - The size of thread in the fixed thread pool.task - The task to execute.delay - The time from now to delay execution.unit - The time unit of the delay parameter.priority - The priority of thread in the poll.public static <T> void executeByFixedAtFixRate(int size,
FoxBaseThreadUtils.Task<T> task,
long period,
java.util.concurrent.TimeUnit unit)
T - The type of the task's result.size - The size of thread in the fixed thread pool.task - The task to execute.period - The period between successive executions.unit - The time unit of the period parameter.public static <T> void executeByFixedAtFixRate(int size,
FoxBaseThreadUtils.Task<T> task,
long period,
java.util.concurrent.TimeUnit unit,
int priority)
T - The type of the task's result.size - The size of thread in the fixed thread pool.task - The task to execute.period - The period between successive executions.unit - The time unit of the period parameter.priority - The priority of thread in the poll.public static <T> void executeByFixedAtFixRate(int size,
FoxBaseThreadUtils.Task<T> task,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
T - The type of the task's result.size - The size of thread in the fixed thread pool.task - The task to execute.initialDelay - The time to delay first execution.period - The period between successive executions.unit - The time unit of the initialDelay and period parameters.public static <T> void executeByFixedAtFixRate(int size,
FoxBaseThreadUtils.Task<T> task,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit,
int priority)
T - The type of the task's result.size - The size of thread in the fixed thread pool.task - The task to execute.initialDelay - The time to delay first execution.period - The period between successive executions.unit - The time unit of the initialDelay and period parameters.priority - The priority of thread in the poll.public static <T> void executeBySingle(FoxBaseThreadUtils.Task<T> task)
T - The type of the task's result.task - The task to execute.public static <T> void executeBySingle(FoxBaseThreadUtils.Task<T> task, int priority)
T - The type of the task's result.task - The task to execute.priority - The priority of thread in the poll.public static <T> void executeBySingleWithDelay(FoxBaseThreadUtils.Task<T> task, long delay, java.util.concurrent.TimeUnit unit)
T - The type of the task's result.task - The task to execute.delay - The time from now to delay execution.unit - The time unit of the delay parameter.public static <T> void executeBySingleWithDelay(FoxBaseThreadUtils.Task<T> task, long delay, java.util.concurrent.TimeUnit unit, int priority)
T - The type of the task's result.task - The task to execute.delay - The time from now to delay execution.unit - The time unit of the delay parameter.priority - The priority of thread in the poll.public static <T> void executeBySingleAtFixRate(FoxBaseThreadUtils.Task<T> task, long period, java.util.concurrent.TimeUnit unit)
T - The type of the task's result.task - The task to execute.period - The period between successive executions.unit - The time unit of the period parameter.public static <T> void executeBySingleAtFixRate(FoxBaseThreadUtils.Task<T> task, long period, java.util.concurrent.TimeUnit unit, int priority)
T - The type of the task's result.task - The task to execute.period - The period between successive executions.unit - The time unit of the period parameter.priority - The priority of thread in the poll.public static <T> void executeBySingleAtFixRate(FoxBaseThreadUtils.Task<T> task, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
T - The type of the task's result.task - The task to execute.initialDelay - The time to delay first execution.period - The period between successive executions.unit - The time unit of the initialDelay and period parameters.public static <T> void executeBySingleAtFixRate(FoxBaseThreadUtils.Task<T> task, long initialDelay, long period, java.util.concurrent.TimeUnit unit, int priority)
T - The type of the task's result.task - The task to execute.initialDelay - The time to delay first execution.period - The period between successive executions.unit - The time unit of the initialDelay and period parameters.priority - The priority of thread in the poll.public static <T> void executeByCached(FoxBaseThreadUtils.Task<T> task)
T - The type of the task's result.task - The task to execute.public static <T> void executeByCached(FoxBaseThreadUtils.Task<T> task, int priority)
T - The type of the task's result.task - The task to execute.priority - The priority of thread in the poll.public static <T> void executeByCachedWithDelay(FoxBaseThreadUtils.Task<T> task, long delay, java.util.concurrent.TimeUnit unit)
T - The type of the task's result.task - The task to execute.delay - The time from now to delay execution.unit - The time unit of the delay parameter.public static <T> void executeByCachedWithDelay(FoxBaseThreadUtils.Task<T> task, long delay, java.util.concurrent.TimeUnit unit, int priority)
T - The type of the task's result.task - The task to execute.delay - The time from now to delay execution.unit - The time unit of the delay parameter.priority - The priority of thread in the poll.public static <T> void executeByCachedAtFixRate(FoxBaseThreadUtils.Task<T> task, long period, java.util.concurrent.TimeUnit unit)
T - The type of the task's result.task - The task to execute.period - The period between successive executions.unit - The time unit of the period parameter.public static <T> void executeByCachedAtFixRate(FoxBaseThreadUtils.Task<T> task, long period, java.util.concurrent.TimeUnit unit, int priority)
T - The type of the task's result.task - The task to execute.period - The period between successive executions.unit - The time unit of the period parameter.priority - The priority of thread in the poll.public static <T> void executeByCachedAtFixRate(FoxBaseThreadUtils.Task<T> task, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
T - The type of the task's result.task - The task to execute.initialDelay - The time to delay first execution.period - The period between successive executions.unit - The time unit of the initialDelay and period parameters.public static <T> void executeByCachedAtFixRate(FoxBaseThreadUtils.Task<T> task, long initialDelay, long period, java.util.concurrent.TimeUnit unit, int priority)
T - The type of the task's result.task - The task to execute.initialDelay - The time to delay first execution.period - The period between successive executions.unit - The time unit of the initialDelay and period parameters.priority - The priority of thread in the poll.public static <T> void executeByIo(FoxBaseThreadUtils.Task<T> task)
T - The type of the task's result.task - The task to execute.public static <T> void executeByIo(FoxBaseThreadUtils.Task<T> task, int priority)
T - The type of the task's result.task - The task to execute.priority - The priority of thread in the poll.public static <T> void executeByIoWithDelay(FoxBaseThreadUtils.Task<T> task, long delay, java.util.concurrent.TimeUnit unit)
T - The type of the task's result.task - The task to execute.delay - The time from now to delay execution.unit - The time unit of the delay parameter.public static <T> void executeByIoWithDelay(FoxBaseThreadUtils.Task<T> task, long delay, java.util.concurrent.TimeUnit unit, int priority)
T - The type of the task's result.task - The task to execute.delay - The time from now to delay execution.unit - The time unit of the delay parameter.priority - The priority of thread in the poll.public static <T> void executeByIoAtFixRate(FoxBaseThreadUtils.Task<T> task, long period, java.util.concurrent.TimeUnit unit)
T - The type of the task's result.task - The task to execute.period - The period between successive executions.unit - The time unit of the period parameter.public static <T> void executeByIoAtFixRate(FoxBaseThreadUtils.Task<T> task, long period, java.util.concurrent.TimeUnit unit, int priority)
T - The type of the task's result.task - The task to execute.period - The period between successive executions.unit - The time unit of the period parameter.priority - The priority of thread in the poll.public static <T> void executeByIoAtFixRate(FoxBaseThreadUtils.Task<T> task, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
T - The type of the task's result.task - The task to execute.initialDelay - The time to delay first execution.period - The period between successive executions.unit - The time unit of the initialDelay and period parameters.public static <T> void executeByIoAtFixRate(FoxBaseThreadUtils.Task<T> task, long initialDelay, long period, java.util.concurrent.TimeUnit unit, int priority)
T - The type of the task's result.task - The task to execute.initialDelay - The time to delay first execution.period - The period between successive executions.unit - The time unit of the initialDelay and period parameters.priority - The priority of thread in the poll.public static <T> void executeByCpu(FoxBaseThreadUtils.Task<T> task)
T - The type of the task's result.task - The task to execute.public static <T> void executeByCpu(FoxBaseThreadUtils.Task<T> task, int priority)
T - The type of the task's result.task - The task to execute.priority - The priority of thread in the poll.public static <T> void executeByCpuWithDelay(FoxBaseThreadUtils.Task<T> task, long delay, java.util.concurrent.TimeUnit unit)
T - The type of the task's result.task - The task to execute.delay - The time from now to delay execution.unit - The time unit of the delay parameter.public static <T> void executeByCpuWithDelay(FoxBaseThreadUtils.Task<T> task, long delay, java.util.concurrent.TimeUnit unit, int priority)
T - The type of the task's result.task - The task to execute.delay - The time from now to delay execution.unit - The time unit of the delay parameter.priority - The priority of thread in the poll.public static <T> void executeByCpuAtFixRate(FoxBaseThreadUtils.Task<T> task, long period, java.util.concurrent.TimeUnit unit)
T - The type of the task's result.task - The task to execute.period - The period between successive executions.unit - The time unit of the period parameter.public static <T> void executeByCpuAtFixRate(FoxBaseThreadUtils.Task<T> task, long period, java.util.concurrent.TimeUnit unit, int priority)
T - The type of the task's result.task - The task to execute.period - The period between successive executions.unit - The time unit of the period parameter.priority - The priority of thread in the poll.public static <T> void executeByCpuAtFixRate(FoxBaseThreadUtils.Task<T> task, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
T - The type of the task's result.task - The task to execute.initialDelay - The time to delay first execution.period - The period between successive executions.unit - The time unit of the initialDelay and period parameters.public static <T> void executeByCpuAtFixRate(FoxBaseThreadUtils.Task<T> task, long initialDelay, long period, java.util.concurrent.TimeUnit unit, int priority)
T - The type of the task's result.task - The task to execute.initialDelay - The time to delay first execution.period - The period between successive executions.unit - The time unit of the initialDelay and period parameters.priority - The priority of thread in the poll.public static <T> void executeByCustom(java.util.concurrent.ExecutorService pool,
FoxBaseThreadUtils.Task<T> task)
T - The type of the task's result.pool - The custom thread pool.task - The task to execute.public static <T> void executeByCustomWithDelay(java.util.concurrent.ExecutorService pool,
FoxBaseThreadUtils.Task<T> task,
long delay,
java.util.concurrent.TimeUnit unit)
T - The type of the task's result.pool - The custom thread pool.task - The task to execute.delay - The time from now to delay execution.unit - The time unit of the delay parameter.public static <T> void executeByCustomAtFixRate(java.util.concurrent.ExecutorService pool,
FoxBaseThreadUtils.Task<T> task,
long period,
java.util.concurrent.TimeUnit unit)
T - The type of the task's result.pool - The custom thread pool.task - The task to execute.period - The period between successive executions.unit - The time unit of the period parameter.public static <T> void executeByCustomAtFixRate(java.util.concurrent.ExecutorService pool,
FoxBaseThreadUtils.Task<T> task,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
T - The type of the task's result.pool - The custom thread pool.task - The task to execute.initialDelay - The time to delay first execution.period - The period between successive executions.unit - The time unit of the initialDelay and period parameters.public static void cancel(FoxBaseThreadUtils.Task task)
task - The task to cancel.public static void cancel(FoxBaseThreadUtils.Task... tasks)
tasks - The tasks to cancel.public static void cancel(java.util.List<FoxBaseThreadUtils.Task> tasks)
tasks - The tasks to cancel.public static void cancel(java.util.concurrent.ExecutorService executorService)
executorService - The pool.public static void setDeliver(java.util.concurrent.Executor deliver)
deliver - The deliver.