Class TtlThreadPoolTaskScheduler
-
- All Implemented Interfaces:
-
java.io.Serializable,java.util.EventListener,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.context.ApplicationContextAware,org.springframework.context.ApplicationListener,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle,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 TtlThreadPoolTaskScheduler extends ThreadPoolTaskScheduleruse Ttl ThreadPool
- Since:
2022-12-03
trydofor
-
-
Field Summary
Fields Modifier and Type Field Description public volatile intpoolSizepublic Clockclockpublic ScheduledExecutorServicescheduledExecutorpublic intphasepublic final static intDEFAULT_PHASEpublic StringthreadNamePrefixpublic intthreadPrioritypublic ThreadGroupthreadGrouppublic final static longTIMEOUT_IMMEDIATEpublic final static longTIMEOUT_INDEFINITE
-
Constructor Summary
Constructors Constructor Description TtlThreadPoolTaskScheduler()TtlThreadPoolTaskScheduler(boolean releaseTtlValueReferenceAfterRun, boolean idempotent)
-
Method Summary
Modifier and Type Method Description voidexecute(@NotNull() Runnable task)Future<out Object>submit(@NotNull() Runnable task)<T> Future<T>submit(@NotNull() Callable<T> task)ListenableFuture<out Object>submitListenable(@NotNull() Runnable task)<T> ListenableFuture<T>submitListenable(@NotNull() Callable<T> task)ScheduledFuture<out Object>schedule(@NotNull() Runnable task, @NotNull() Trigger trigger)ScheduledFuture<out Object>schedule(@NotNull() Runnable task, @NotNull() Date startTime)ScheduledFuture<out Object>scheduleAtFixedRate(@NotNull() Runnable task, @NotNull() Date startTime, long period)ScheduledFuture<out Object>scheduleAtFixedRate(@NotNull() Runnable task, long period)ScheduledFuture<out Object>scheduleWithFixedDelay(@NotNull() Runnable task, @NotNull() Date startTime, long delay)ScheduledFuture<out Object>scheduleWithFixedDelay(@NotNull() Runnable task, long delay)ScheduledFuture<out Object>schedule(@NotNull() Runnable task, @NotNull() Instant startTime)ScheduledFuture<out Object>scheduleAtFixedRate(@NotNull() Runnable task, @NotNull() Instant startTime, @NotNull() Duration period)ScheduledFuture<out Object>scheduleAtFixedRate(@NotNull() Runnable task, @NotNull() Duration period)ScheduledFuture<out Object>scheduleWithFixedDelay(@NotNull() Runnable task, @NotNull() Instant startTime, @NotNull() Duration delay)ScheduledFuture<out Object>scheduleWithFixedDelay(@NotNull() Runnable task, @NotNull() Duration delay)ThreadnewThread(@NotNull() Runnable task)ThreadcreateThread(@NotNull() Runnable task)-
Methods inherited from class org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler
getActiveCount, getClock, getPoolSize, getScheduledExecutor, getScheduledThreadPoolExecutor, isRemoveOnCancelPolicy, setClock, setContinueExistingPeriodicTasksAfterShutdownPolicy, setErrorHandler, setExecuteExistingDelayedTasksAfterShutdownPolicy, setPoolSize, setRemoveOnCancelPolicy -
Methods inherited from class org.springframework.scheduling.concurrent.ExecutorConfigurationSupport
afterPropertiesSet, destroy, getPhase, initialize, initiateShutdown, isRunning, onApplicationEvent, setAcceptTasksAfterContextClose, setApplicationContext, setAwaitTerminationMillis, setAwaitTerminationSeconds, setBeanName, setPhase, setRejectedExecutionHandler, setThreadFactory, setThreadNamePrefix, setWaitForTasksToCompleteOnShutdown, shutdown, start, stop -
Methods inherited from class org.springframework.util.CustomizableThreadCreator
getThreadGroup, getThreadNamePrefix, getThreadPriority, isDaemon, setDaemon, setThreadGroup, setThreadGroupName, setThreadPriority -
Methods inherited from class org.springframework.scheduling.SchedulingTaskExecutor
prefersShortLivedTasks -
Methods inherited from class org.springframework.context.SmartLifecycle
isAutoStartup -
Methods inherited from class org.springframework.context.ApplicationListener
forPayload, supportsAsyncExecution -
Methods inherited from class org.springframework.core.task.AsyncTaskExecutor
submitCompletable, submitCompletable -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
submitListenable
@NotNull()@Deprecated() ListenableFuture<out Object> submitListenable(@NotNull() Runnable task)
-
submitListenable
@NotNull()@Deprecated() <T> ListenableFuture<T> submitListenable(@NotNull() Callable<T> task)
-
schedule
ScheduledFuture<out Object> schedule(@NotNull() Runnable task, @NotNull() Trigger trigger)
-
schedule
@NotNull()@Deprecated() ScheduledFuture<out Object> schedule(@NotNull() Runnable task, @NotNull() Date startTime)
-
scheduleAtFixedRate
@NotNull()@Deprecated() ScheduledFuture<out Object> scheduleAtFixedRate(@NotNull() Runnable task, @NotNull() Date startTime, long period)
-
scheduleAtFixedRate
@NotNull()@Deprecated() ScheduledFuture<out Object> scheduleAtFixedRate(@NotNull() Runnable task, long period)
-
scheduleWithFixedDelay
@NotNull()@Deprecated() ScheduledFuture<out Object> scheduleWithFixedDelay(@NotNull() Runnable task, @NotNull() Date startTime, long delay)
-
scheduleWithFixedDelay
@NotNull()@Deprecated() ScheduledFuture<out Object> scheduleWithFixedDelay(@NotNull() Runnable task, long delay)
-
schedule
@NotNull() ScheduledFuture<out Object> schedule(@NotNull() Runnable task, @NotNull() Instant startTime)
-
scheduleAtFixedRate
@NotNull() ScheduledFuture<out Object> scheduleAtFixedRate(@NotNull() Runnable task, @NotNull() Instant startTime, @NotNull() Duration period)
-
scheduleAtFixedRate
@NotNull() ScheduledFuture<out Object> scheduleAtFixedRate(@NotNull() Runnable task, @NotNull() Duration period)
-
scheduleWithFixedDelay
@NotNull() ScheduledFuture<out Object> scheduleWithFixedDelay(@NotNull() Runnable task, @NotNull() Instant startTime, @NotNull() Duration delay)
-
scheduleWithFixedDelay
@NotNull() ScheduledFuture<out Object> scheduleWithFixedDelay(@NotNull() Runnable task, @NotNull() Duration delay)
-
createThread
@NotNull() Thread createThread(@NotNull() Runnable task)
-
-
-
-