W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
Property Name | Required | Type | Default Value |
---|---|---|---|
org.quartz.threadPool.class | yes | string (class name) | null |
org.quartz.threadPool.threadCount | yes | int | -1 |
org.quartz.threadPool.threadPriority | no | int | Thread.NORM_PRIORITY (5) |
org.quartz.threadPool.class
是要使用的ThreadPool實現(xiàn)的名稱。Quartz附帶的線程池是“org.quartz.simpl.SimpleThreadPool”,并且應(yīng)該能夠滿足幾乎每個用戶的需求。它有非常簡單的行為,并經(jīng)過很好的測試。它提供了一個固定大小的線程池,可以“生活”計劃程序的生命周期。
org.quartz.threadPool.threadCount
可以是任何正整數(shù),雖然你應(yīng)該意識到只有1到100之間的數(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 。默認值為Thread.NORM_PRIORITY(5)。
Property Name | Required | Type | Default Value |
---|---|---|---|
org.quartz.threadPool.makeThreadsDaemons | no | boolean | false |
org.quartz.threadPool.threadsInheritGroupOfInitializingThread | no | boolean | true |
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread | no | boolean | false |
org.quartz.threadPool.threadNamePrefix | no | string | [Scheduler Name]_Worker |
org.quartz.threadPool.makeThreadsDaemons
可以設(shè)置為“true”,使池中的線程創(chuàng)建為守護進程線程。默認為“false”。另請參見org.quartz.scheduler.makeSchedulerThreadDaemon屬性。
org.quartz.threadPool.threadsInheritGroupOfInitializingThread
可以是“true”或“false”,默認為true。
org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread
可以是“true”或“false”,默認為false。
org.quartz.threadPool.threadNamePrefix
在工作池中的線程名稱的前綴將被附加一個數(shù)字。
如果你使用你自己的一個線程池的實現(xiàn),你可以通過命名屬性來簡單地設(shè)置它上面的屬性:
在自定義線程池上設(shè)置屬性
org.quartz.threadPool.class = com.mycompany.goo.FooThreadPool
org.quartz.threadPool.somePropOfFooThreadPool = someValue
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: