Class MonitoredThreadPoolTaskScheduler
- java.lang.Object
-
- org.springframework.util.CustomizableThreadCreator
-
- org.springframework.scheduling.concurrent.CustomizableThreadFactory
-
- org.springframework.scheduling.concurrent.ExecutorConfigurationSupport
-
- org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
-
- io.microsphere.spring.boot.actuate.MonitoredThreadPoolTaskScheduler
-
- All Implemented Interfaces:
java.io.Serializable,java.util.concurrent.Executor,java.util.concurrent.ThreadFactory,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.beans.factory.SmartInitializingSingleton,org.springframework.context.ApplicationContextAware,org.springframework.core.task.AsyncListenableTaskExecutor,org.springframework.core.task.AsyncTaskExecutor,org.springframework.core.task.TaskExecutor,org.springframework.scheduling.SchedulingTaskExecutor,org.springframework.scheduling.TaskScheduler
public class MonitoredThreadPoolTaskScheduler extends org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.SmartInitializingSingletonThreadPoolTaskSchedulerwithExecutorServiceMetricsfeatures- Since:
- 1.0.0
- Author:
- Mercy
- See Also:
ThreadPoolTaskScheduler,ExecutorServiceMetrics,TimedScheduledExecutorService, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MonitoredThreadPoolTaskScheduler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterSingletonsInstantiated()protected java.util.concurrent.ScheduledExecutorServicecreateExecutor(int poolSize, java.util.concurrent.ThreadFactory threadFactory, java.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)java.util.concurrent.ScheduledExecutorServicegetScheduledExecutor()voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext)voidsetBeanName(java.lang.String name)-
Methods inherited from class org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
cancelRemainingTask, execute, execute, getActiveCount, getClock, getPoolSize, getScheduledThreadPoolExecutor, initializeExecutor, isRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleAtFixedRate, scheduleWithFixedDelay, scheduleWithFixedDelay, setClock, setContinueExistingPeriodicTasksAfterShutdownPolicy, setErrorHandler, setExecuteExistingDelayedTasksAfterShutdownPolicy, setPoolSize, setRemoveOnCancelPolicy, submit, submit, submitListenable, submitListenable
-
Methods inherited from class org.springframework.scheduling.concurrent.ExecutorConfigurationSupport
afterPropertiesSet, destroy, initialize, setAwaitTerminationMillis, setAwaitTerminationSeconds, setRejectedExecutionHandler, setThreadFactory, setThreadNamePrefix, setWaitForTasksToCompleteOnShutdown, shutdown
-
Methods inherited from class org.springframework.scheduling.concurrent.CustomizableThreadFactory
newThread
-
Methods inherited from class org.springframework.util.CustomizableThreadCreator
createThread, getDefaultThreadNamePrefix, getThreadGroup, getThreadNamePrefix, getThreadPriority, isDaemon, nextThreadName, setDaemon, setThreadGroup, setThreadGroupName, setThreadPriority
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
createExecutor
protected java.util.concurrent.ScheduledExecutorService createExecutor(int poolSize, java.util.concurrent.ThreadFactory threadFactory, java.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)- Overrides:
createExecutorin classorg.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
-
getScheduledExecutor
public java.util.concurrent.ScheduledExecutorService getScheduledExecutor() throws java.lang.IllegalStateException- Overrides:
getScheduledExecutorin classorg.springframework.scheduling.concurrent.ThreadPoolTaskScheduler- Throws:
java.lang.IllegalStateException
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()
- Specified by:
afterSingletonsInstantiatedin interfaceorg.springframework.beans.factory.SmartInitializingSingleton
-
setBeanName
public void setBeanName(java.lang.String name)
- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware- Overrides:
setBeanNamein classorg.springframework.scheduling.concurrent.ExecutorConfigurationSupport
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
-