99re热这里只有精品视频,7777色鬼xxxx欧美色妇,国产成人精品一区二三区在线观看,内射爽无广熟女亚洲,精品人妻av一区二区三区

Quartz配置ThreadPool設(shè)置

2018-09-20 10:56 更新
Property NameRequiredTypeDefault Value
org.quartz.threadPool.classyesstring (class name)null
org.quartz.threadPool.threadCountyesint-1
org.quartz.threadPool.threadPrioritynointThread.NORM_PRIORITY (5)

org.quartz.threadPool.class

是要使用的ThreadPool實(shí)現(xiàn)的名稱。Quartz附帶的線程池是“org.quartz.simpl.SimpleThreadPool”,并且應(yīng)該能夠滿足幾乎每個用戶的需求。它有非常簡單的行為,并經(jīng)過很好的測試。它提供了一個固定大小的線程池,可以“生活”計劃程序的生命周期。

org.quartz.threadPool.threadCount

可以是任何正整數(shù),雖然你應(yīng)該意識到只有1到100之間的數(shù)字是非常實(shí)用的。這是可用于并發(fā)執(zhí)行作業(yè)的線程數(shù)。如果你只有幾個工作每天發(fā)射幾次,那么1個線程是很多!如果你有成千上萬的工作,每分鐘都有很多工作,那么你可能希望一個線程數(shù)可能更多的是50或100(這很重要,取決于你的工作所執(zhí)行的工作的性質(zhì),以及你的系統(tǒng)資源?。?/p>

org.quartz.threadPool.threadPriority

可以是Thread.MIN_PRIORITY(即1)和Thread.MAX_PRIORITY(這是10)之間的任何int 。默認(rèn)值為Thread.NORM_PRIORITY(5)。

SimpleThreadPool特定的屬性

Property NameRequiredTypeDefault Value
org.quartz.threadPool.makeThreadsDaemonsnobooleanfalse
org.quartz.threadPool.threadsInheritGroupOfInitializingThreadnobooleantrue
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThreadnobooleanfalse
org.quartz.threadPool.threadNamePrefixnostring[Scheduler Name]_Worker

org.quartz.threadPool.makeThreadsDaemons

可以設(shè)置為“true”,使池中的線程創(chuàng)建為守護(hù)進(jìn)程線程。默認(rèn)為“false”。另請參見org.quartz.scheduler.makeSchedulerThreadDaemon屬性。

org.quartz.threadPool.threadsInheritGroupOfInitializingThread

可以是“true”或“false”,默認(rèn)為true。

org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread

可以是“true”或“false”,默認(rèn)為false。

org.quartz.threadPool.threadNamePrefix

在工作池中的線程名稱的前綴將被附加一個數(shù)字。

自定義ThreadPools

如果你使用你自己的一個線程池的實(shí)現(xiàn),你可以通過命名屬性來簡單地設(shè)置它上面的屬性:

在自定義線程池上設(shè)置屬性

org.quartz.threadPool.class = com.mycompany.goo.FooThreadPool
org.quartz.threadPool.somePropOfFooThreadPool = someValue


以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號