类的使用
org.springframework.boot.task.ThreadPoolTaskExecutorBuilder
程序包
说明
Utilities and classes related to task execution and scheduling.
-
org.springframework.boot.task中ThreadPoolTaskExecutorBuilder的使用
修饰符和类型方法说明ThreadPoolTaskExecutorBuilder.acceptTasksAfterContextClose(boolean acceptTasksAfterContextClose) Set whether to accept further tasks after the application context close phase has begun.ThreadPoolTaskExecutorBuilder.additionalCustomizers(Iterable<? extends ThreadPoolTaskExecutorCustomizer> customizers) AddThreadPoolTaskExecutorCustomizersthat should be applied to theThreadPoolTaskExecutor.ThreadPoolTaskExecutorBuilder.additionalCustomizers(ThreadPoolTaskExecutorCustomizer... customizers) AddThreadPoolTaskExecutorCustomizersthat should be applied to theThreadPoolTaskExecutor.ThreadPoolTaskExecutorBuilder.allowCoreThreadTimeOut(boolean allowCoreThreadTimeOut) Set whether core threads are allowed to time out.ThreadPoolTaskExecutorBuilder.awaitTermination(boolean awaitTermination) Set whether the executor should wait for scheduled tasks to complete on shutdown, not interrupting running tasks and executing all tasks in the queue.ThreadPoolTaskExecutorBuilder.awaitTerminationPeriod(Duration awaitTerminationPeriod) Set the maximum time the executor is supposed to block on shutdown.ThreadPoolTaskExecutorBuilder.corePoolSize(int corePoolSize) Set the core number of threads.ThreadPoolTaskExecutorBuilder.customizers(Iterable<? extends ThreadPoolTaskExecutorCustomizer> customizers) Set theThreadPoolTaskExecutorCustomizersthat should be applied to theThreadPoolTaskExecutor.ThreadPoolTaskExecutorBuilder.customizers(ThreadPoolTaskExecutorCustomizer... customizers) Set theThreadPoolTaskExecutorCustomizersthat should be applied to theThreadPoolTaskExecutor.Set the time limit for which threads may remain idle before being terminated.ThreadPoolTaskExecutorBuilder.maxPoolSize(int maxPoolSize) Set the maximum allowed number of threads.ThreadPoolTaskExecutorBuilder.queueCapacity(int queueCapacity) Set the capacity of the queue.ThreadPoolTaskExecutorBuilder.taskDecorator(TaskDecorator taskDecorator) Set theTaskDecoratorto use ornullto not use any.ThreadPoolTaskExecutorBuilder.threadNamePrefix(String threadNamePrefix) Set the prefix to use for the names of newly created threads.