public class ScheduledDtpExecutor extends DtpExecutor implements ScheduledExecutorService
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicyExecutorAdapter.UnsupportedBlockingQueueawaitTerminationSeconds, threadPoolName, waitForTasksToCompleteOnShutdown| 构造器和说明 |
|---|
ScheduledDtpExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> workQueue,
ThreadFactory threadFactory,
RejectedExecutionHandler handler) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
allowCoreThreadTimeOut(boolean value)
Allow core thread time out
|
boolean |
allowsCoreThreadTimeOut()
If allow core thread time out
|
boolean |
awaitTermination(long timeout,
TimeUnit unit) |
void |
execute(Runnable command)
Execute the task
|
int |
getActiveCount()
Get the active count
|
long |
getCompletedTaskCount()
Get the completed task count
|
int |
getCorePoolSize()
Get the core pool size
|
long |
getKeepAliveTime(TimeUnit unit)
Get the keep alive time
|
int |
getLargestPoolSize()
Get the largest pool size
|
int |
getMaximumPoolSize()
Get the maximum pool size
|
int |
getPoolSize()
Get the pool size
|
BlockingQueue<Runnable> |
getQueue()
Get the queue
|
int |
getQueueCapacity() |
String |
getQueueName() |
RejectedExecutionHandler |
getRejectedExecutionHandler()
Get the rejected execution handler
|
long |
getTaskCount()
Get the task count
|
ThreadFactory |
getThreadFactory() |
<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) |
boolean |
isShutdown() |
boolean |
isTerminated() |
int |
prestartAllCoreThreads() |
boolean |
prestartCoreThread() |
<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) |
void |
setAllowCoreThreadTimeOut(boolean allowCoreThreadTimeOut)
In order for the field can be assigned by reflection.
|
void |
setCorePoolSize(int corePoolSize)
Set the core pool size
|
void |
setKeepAliveTime(long time,
TimeUnit unit)
Set the keep alive time
|
void |
setMaximumPoolSize(int maximumPoolSize)
Set the maximum pool size
|
void |
setRejectedExecutionHandler(RejectedExecutionHandler handler)
Set the rejected execution handler
|
void |
setThreadFactory(ThreadFactory threadFactory) |
void |
shutdown() |
List<Runnable> |
shutdownNow() |
<T> Future<T> |
submit(Callable<T> task) |
Future<?> |
submit(Runnable task) |
<T> Future<T> |
submit(Runnable task,
T result) |
afterExecute, beforeExecute, execute, getNotifyItems, getOriginal, getPlatformIds, getQueueTimeout, getQueueTimeoutCount, getRejectCount, getRejectHandlerName, getRunTimeout, getRunTimeoutCount, getThreadPoolAliasName, incRejectCount, initialize, isNotifyEnabled, setNotifyEnabled, setNotifyItems, setPlatformIds, setPreStartAllCoreThreads, setQueueTimeout, setRejectHandlerName, setRunTimeout, setTaskWrappers, setThreadPoolAliasName, wrapTasksafterPropertiesSet, cancelRemainingTask, destroy, getThreadPoolName, internalShutdown, setAwaitTerminationSeconds, setThreadPoolName, setWaitForTasksToCompleteOnShutdownfinalize, isTerminating, purge, remove, terminated, toStringnewTaskFor, newTaskForpublic ScheduledDtpExecutor(int corePoolSize,
int maximumPoolSize,
long keepAliveTime,
TimeUnit unit,
BlockingQueue<Runnable> workQueue,
ThreadFactory threadFactory,
RejectedExecutionHandler handler)
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
schedule 在接口中 ScheduledExecutorServicepublic <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
schedule 在接口中 ScheduledExecutorServicepublic ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleAtFixedRate 在接口中 ScheduledExecutorServicepublic void execute(Runnable command)
ExecutorAdapterexecute 在接口中 ExecutorAdapter<ThreadPoolExecutor>execute 在接口中 Executorexecute 在接口中 org.springframework.core.task.TaskExecutorexecute 在类中 DtpExecutorcommand - the runnable taskpublic Future<?> submit(Runnable task)
submit 在接口中 ExecutorServicesubmit 在接口中 org.springframework.core.task.AsyncTaskExecutorsubmit 在类中 AbstractExecutorServicepublic <T> Future<T> submit(Runnable task, T result)
submit 在接口中 ExecutorServicesubmit 在类中 AbstractExecutorServicepublic <T> Future<T> submit(Callable<T> task)
submit 在接口中 ExecutorServicesubmit 在接口中 org.springframework.core.task.AsyncTaskExecutorsubmit 在类中 AbstractExecutorServicepublic <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException
invokeAll 在接口中 ExecutorServiceinvokeAll 在类中 AbstractExecutorServiceInterruptedExceptionpublic <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException
invokeAll 在接口中 ExecutorServiceinvokeAll 在类中 AbstractExecutorServiceInterruptedExceptionpublic <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 在类中 AbstractExecutorServiceInterruptedExceptionExecutionExceptionTimeoutExceptionpublic void shutdown()
shutdown 在接口中 ExecutorServiceshutdown 在类中 ThreadPoolExecutorpublic List<Runnable> shutdownNow()
shutdownNow 在接口中 ExecutorServiceshutdownNow 在类中 ThreadPoolExecutorpublic boolean isShutdown()
isShutdown 在接口中 ExecutorServiceisShutdown 在类中 ThreadPoolExecutorpublic boolean isTerminated()
isTerminated 在接口中 ExecutorServiceisTerminated 在类中 ThreadPoolExecutorpublic boolean awaitTermination(long timeout,
TimeUnit unit)
throws InterruptedException
awaitTermination 在接口中 ExecutorServiceawaitTermination 在类中 ThreadPoolExecutorInterruptedExceptionpublic void setRejectedExecutionHandler(RejectedExecutionHandler handler)
ExecutorAdaptersetRejectedExecutionHandler 在接口中 ExecutorAdapter<ThreadPoolExecutor>setRejectedExecutionHandler 在类中 ThreadPoolExecutorhandler - the rejected execution handlerpublic RejectedExecutionHandler getRejectedExecutionHandler()
ExecutorAdaptergetRejectedExecutionHandler 在接口中 ExecutorAdapter<ThreadPoolExecutor>getRejectedExecutionHandler 在类中 ThreadPoolExecutorpublic void setCorePoolSize(int corePoolSize)
ExecutorAdaptersetCorePoolSize 在接口中 ExecutorAdapter<ThreadPoolExecutor>setCorePoolSize 在类中 ThreadPoolExecutorcorePoolSize - the core pool sizepublic int getCorePoolSize()
ExecutorAdaptergetCorePoolSize 在接口中 ExecutorAdapter<ThreadPoolExecutor>getCorePoolSize 在类中 ThreadPoolExecutorpublic void setMaximumPoolSize(int maximumPoolSize)
ExecutorAdaptersetMaximumPoolSize 在接口中 ExecutorAdapter<ThreadPoolExecutor>setMaximumPoolSize 在类中 ThreadPoolExecutormaximumPoolSize - the maximum pool sizepublic int getMaximumPoolSize()
ExecutorAdaptergetMaximumPoolSize 在接口中 ExecutorAdapter<ThreadPoolExecutor>getMaximumPoolSize 在类中 ThreadPoolExecutorpublic String getQueueName()
getQueueName 在类中 DtpExecutorpublic int getQueueCapacity()
getQueueCapacity 在类中 DtpExecutorpublic void setAllowCoreThreadTimeOut(boolean allowCoreThreadTimeOut)
DtpExecutorsetAllowCoreThreadTimeOut 在类中 DtpExecutorallowCoreThreadTimeOut - allowCoreThreadTimeOutpublic void setThreadFactory(ThreadFactory threadFactory)
setThreadFactory 在类中 ThreadPoolExecutorpublic ThreadFactory getThreadFactory()
getThreadFactory 在类中 ThreadPoolExecutorpublic boolean prestartCoreThread()
prestartCoreThread 在类中 ThreadPoolExecutorpublic void setKeepAliveTime(long time,
TimeUnit unit)
ExecutorAdaptersetKeepAliveTime 在接口中 ExecutorAdapter<ThreadPoolExecutor>setKeepAliveTime 在类中 ThreadPoolExecutortime - the keep alive timeunit - the time unitpublic long getKeepAliveTime(TimeUnit unit)
ExecutorAdaptergetKeepAliveTime 在接口中 ExecutorAdapter<ThreadPoolExecutor>getKeepAliveTime 在类中 ThreadPoolExecutorunit - the time unitpublic BlockingQueue<Runnable> getQueue()
ExecutorAdaptergetQueue 在接口中 ExecutorAdapter<ThreadPoolExecutor>getQueue 在类中 ThreadPoolExecutorpublic int prestartAllCoreThreads()
public boolean allowsCoreThreadTimeOut()
ExecutorAdapterallowsCoreThreadTimeOut 在接口中 ExecutorAdapter<ThreadPoolExecutor>allowsCoreThreadTimeOut 在类中 ThreadPoolExecutorpublic void allowCoreThreadTimeOut(boolean value)
ExecutorAdapterallowCoreThreadTimeOut 在接口中 ExecutorAdapter<ThreadPoolExecutor>allowCoreThreadTimeOut 在类中 ThreadPoolExecutorvalue - if allow core thread time outpublic int getPoolSize()
ExecutorAdaptergetPoolSize 在接口中 ExecutorAdapter<ThreadPoolExecutor>getPoolSize 在类中 ThreadPoolExecutorpublic int getActiveCount()
ExecutorAdaptergetActiveCount 在接口中 ExecutorAdapter<ThreadPoolExecutor>getActiveCount 在类中 ThreadPoolExecutorpublic int getLargestPoolSize()
ExecutorAdaptergetLargestPoolSize 在接口中 ExecutorAdapter<ThreadPoolExecutor>getLargestPoolSize 在类中 ThreadPoolExecutorpublic long getTaskCount()
ExecutorAdaptergetTaskCount 在接口中 ExecutorAdapter<ThreadPoolExecutor>getTaskCount 在类中 ThreadPoolExecutorpublic long getCompletedTaskCount()
ExecutorAdaptergetCompletedTaskCount 在接口中 ExecutorAdapter<ThreadPoolExecutor>getCompletedTaskCount 在类中 ThreadPoolExecutorCopyright © 2023. All rights reserved.