public class MdcScheduledThreadPoolExecutor extends ScheduledThreadPoolExecutor
ThreadPoolExecutor.remove(Runnable) 类内部调用有效, 通过实例调用此方法失效ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| 构造器和说明 |
|---|
MdcScheduledThreadPoolExecutor(int corePoolSize) |
MdcScheduledThreadPoolExecutor(int corePoolSize,
RejectedExecutionHandler handler) |
MdcScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory) |
MdcScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
execute(Runnable command) |
<T> List<Future<T>> |
invokeAll(Collection<? extends Callable<T>> tasks) |
<T> List<Future<T>> |
invokeAll(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit) |
<T> T |
invokeAny(Collection<? extends Callable<T>> tasks) |
<T> T |
invokeAny(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit) |
<V> ScheduledFuture<V> |
schedule(Callable<V> callable,
long delay,
TimeUnit unit) |
ScheduledFuture<?> |
schedule(Runnable command,
long delay,
TimeUnit unit) |
ScheduledFuture<?> |
scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit) |
ScheduledFuture<?> |
scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit) |
<T> Future<T> |
submit(Callable<T> task) |
Future<?> |
submit(Runnable task) |
<T> Future<T> |
submit(Runnable task,
T result) |
decorateTask, decorateTask, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNowafterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, terminated, toStringnewTaskFor, newTaskForawaitTermination, isShutdown, isTerminatedpublic MdcScheduledThreadPoolExecutor(int corePoolSize)
public MdcScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory)
public MdcScheduledThreadPoolExecutor(int corePoolSize,
RejectedExecutionHandler handler)
public MdcScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler)
@NonNull public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
schedule 在接口中 ScheduledExecutorServiceschedule 在类中 ScheduledThreadPoolExecutor@NonNull public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
schedule 在接口中 ScheduledExecutorServiceschedule 在类中 ScheduledThreadPoolExecutor@NonNull public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
@NonNull public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
public void execute(Runnable command)
execute 在接口中 Executorexecute 在类中 ScheduledThreadPoolExecutor@NonNull public Future<?> submit(Runnable task)
submit 在接口中 ExecutorServicesubmit 在类中 ScheduledThreadPoolExecutor@NonNull public <T> Future<T> submit(Runnable task, T result)
submit 在接口中 ExecutorServicesubmit 在类中 ScheduledThreadPoolExecutor@NonNull public <T> Future<T> submit(Callable<T> task)
submit 在接口中 ExecutorServicesubmit 在类中 ScheduledThreadPoolExecutor@NonNull public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException
invokeAny 在接口中 ExecutorServiceinvokeAny 在类中 AbstractExecutorServiceInterruptedExceptionExecutionExceptionpublic <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
invokeAny 在接口中 ExecutorServiceinvokeAny 在类中 AbstractExecutorServiceInterruptedExceptionExecutionExceptionTimeoutException@NonNull public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException
invokeAll 在接口中 ExecutorServiceinvokeAll 在类中 AbstractExecutorServiceInterruptedException@NonNull public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException
invokeAll 在接口中 ExecutorServiceinvokeAll 在类中 AbstractExecutorServiceInterruptedExceptionCopyright © 2021. All rights reserved.