Class SofaScheduledThreadPoolExecutor

All Implemented Interfaces:
Executor, ExecutorService, ScheduledExecutorService

public class SofaScheduledThreadPoolExecutor extends ScheduledThreadPoolExecutor
Sofa thread pool based on ScheduledThreadPoolExecutor
Version:
SofaScheduledThreadPoolExecutor.java, v 0.1 2020年11月09日 2:19 下午 huzijie Exp $
Author:
huzijie
  • Constructor Details

    • SofaScheduledThreadPoolExecutor

      public SofaScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler, String threadPoolName, String spaceName, long taskTimeout, long period, TimeUnit timeUnit)
      Basic constructor
      Parameters:
      corePoolSize - same as in ScheduledThreadPoolExecutor
      threadFactory - same as in ScheduledThreadPoolExecutor
      handler - same as in ScheduledThreadPoolExecutor
      threadPoolName - name of this thread pool
      spaceName - spaceName of this tread pool
      taskTimeout - task execution timeout
      period - task checking and logging period
      timeUnit - unit of taskTimeout and period
    • SofaScheduledThreadPoolExecutor

      public SofaScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler, String threadPoolName, long taskTimeout, long period, TimeUnit timeUnit)
    • SofaScheduledThreadPoolExecutor

      public SofaScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler, String threadPoolName, String spaceName)
    • SofaScheduledThreadPoolExecutor

      public SofaScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler, String threadPoolName)
    • SofaScheduledThreadPoolExecutor

      public SofaScheduledThreadPoolExecutor(int corePoolSize, String threadPoolName, String spaceName)
    • SofaScheduledThreadPoolExecutor

      public SofaScheduledThreadPoolExecutor(int corePoolSize, String threadPoolName)
    • SofaScheduledThreadPoolExecutor

      public SofaScheduledThreadPoolExecutor(int corePoolSize)
    • SofaScheduledThreadPoolExecutor

      public SofaScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory)
    • SofaScheduledThreadPoolExecutor

      public SofaScheduledThreadPoolExecutor(int corePoolSize, RejectedExecutionHandler handler)
    • SofaScheduledThreadPoolExecutor

      public SofaScheduledThreadPoolExecutor(int corePoolSize, ThreadFactory threadFactory, RejectedExecutionHandler handler)
  • Method Details

    • beforeExecute

      protected void beforeExecute(Thread t, Runnable r)
      Overrides:
      beforeExecute in class ThreadPoolExecutor
    • afterExecute

      protected void afterExecute(Runnable r, Throwable t)
      Overrides:
      afterExecute in class ThreadPoolExecutor
    • terminated

      protected void terminated()
      Overrides:
      terminated in class ThreadPoolExecutor
    • startSchedule

      public void startSchedule()
    • stopSchedule

      public void stopSchedule()
    • reschedule

      public void reschedule()
    • updateThreadPoolName

      public void updateThreadPoolName(String threadPoolName)
    • updatespaceName

      public void updatespaceName(String spaceName)
    • updatePeriod

      public void updatePeriod(long period)
    • updateTaskTimeout

      public void updateTaskTimeout(long taskTimeout)
    • getConfig

      public ThreadPoolConfig getConfig()
    • getStatistics

      public ThreadPoolStatistics getStatistics()