public class SofaScheduledThreadPoolExecutor extends ScheduledThreadPoolExecutor
ScheduledThreadPoolExecutorThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy| Constructor and Description |
|---|
SofaScheduledThreadPoolExecutor(int corePoolSize) |
SofaScheduledThreadPoolExecutor(int corePoolSize,
RejectedExecutionHandler handler) |
SofaScheduledThreadPoolExecutor(int corePoolSize,
String threadPoolName) |
SofaScheduledThreadPoolExecutor(int corePoolSize,
String threadPoolName,
String spaceName) |
SofaScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory) |
SofaScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler) |
SofaScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler,
String threadPoolName) |
SofaScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler,
String threadPoolName,
long taskTimeout,
long period,
TimeUnit timeUnit) |
SofaScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler,
String threadPoolName,
String spaceName) |
SofaScheduledThreadPoolExecutor(int corePoolSize,
ThreadFactory threadFactory,
RejectedExecutionHandler handler,
String threadPoolName,
String spaceName,
long taskTimeout,
long period,
TimeUnit timeUnit)
Basic constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterExecute(Runnable r,
Throwable t) |
protected void |
beforeExecute(Thread t,
Runnable r) |
ThreadPoolConfig |
getConfig() |
ThreadPoolStatistics |
getStatistics() |
boolean |
isSofaTracerTransmit() |
void |
reschedule() |
<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 |
setSofaTracerTransmit(boolean sofaTracerTransmit) |
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, 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, newTaskForclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitawaitTermination, 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 in class ThreadPoolExecutorprotected void afterExecute(Runnable r, Throwable t)
afterExecute in class ThreadPoolExecutorprotected void terminated()
terminated in class 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()
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
schedule in interface ScheduledExecutorServiceschedule in class ScheduledThreadPoolExecutorpublic <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
schedule in interface ScheduledExecutorServiceschedule in class ScheduledThreadPoolExecutorpublic ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleAtFixedRate in interface ScheduledExecutorServicescheduleAtFixedRate in class ScheduledThreadPoolExecutorpublic ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
scheduleWithFixedDelay in interface ScheduledExecutorServicescheduleWithFixedDelay in class ScheduledThreadPoolExecutorpublic void setSofaTracerTransmit(boolean sofaTracerTransmit)
public boolean isSofaTracerTransmit()
Copyright © 2024. All rights reserved.