public class SofaScheduledThreadPoolExecutor extends ScheduledThreadPoolExecutor
ScheduledThreadPoolExecutorThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
afterExecute(Runnable r,
Throwable t) |
protected void |
beforeExecute(Thread t,
Runnable r) |
ThreadPoolConfig |
getConfig() |
ThreadPoolStatistics |
getStatistics() |
void |
reschedule() |
void |
startSchedule() |
void |
stopSchedule() |
protected void |
terminated() |
void |
updatePeriod(long period) |
void |
updatespaceName(String spaceName) |
void |
updateTaskTimeout(long taskTimeout) |
void |
updateThreadPoolName(String threadPoolName) |
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submitallowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, toStringinvokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskForawaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminatedpublic SofaScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler,
String threadPoolName,
String spaceName,
long taskTimeout,
long period,
TimeUnit timeUnit)
corePoolSize - same as in ScheduledThreadPoolExecutorthreadFactory - same as in ScheduledThreadPoolExecutorhandler - same as in ScheduledThreadPoolExecutorthreadPoolName - name of this thread poolspaceName - spaceName of this tread pooltaskTimeout - task execution timeoutperiod - task checking and logging periodtimeUnit - unit of taskTimeout and periodpublic SofaScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler,
String threadPoolName,
long taskTimeout,
long period,
TimeUnit timeUnit)
public SofaScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler,
String threadPoolName,
String spaceName)
public SofaScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler,
String threadPoolName)
public SofaScheduledThreadPoolExecutor(int corePoolSize,
String threadPoolName,
String spaceName)
public SofaScheduledThreadPoolExecutor(int corePoolSize,
String threadPoolName)
public SofaScheduledThreadPoolExecutor(int corePoolSize)
public SofaScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory)
public SofaScheduledThreadPoolExecutor(int corePoolSize,
RejectedExecutionHandler handler)
public SofaScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler)
protected void beforeExecute(Thread t, Runnable r)
beforeExecute 在类中 ThreadPoolExecutorprotected void afterExecute(Runnable r, Throwable t)
afterExecute 在类中 ThreadPoolExecutorprotected void terminated()
terminated 在类中 ThreadPoolExecutorpublic void startSchedule()
public void stopSchedule()
public void reschedule()
public void updateThreadPoolName(String threadPoolName)
public void updatespaceName(String spaceName)
public void updatePeriod(long period)
public void updateTaskTimeout(long taskTimeout)
public ThreadPoolConfig getConfig()
public ThreadPoolStatistics getStatistics()
Copyright © 2021. All rights reserved.