Quartz 2.0發(fā)布,Java作業(yè)調(diào)度框架
Quartz 2.0 發(fā)布了,Quartz 是一個(gè) Java 輕量級(jí)開(kāi)源企業(yè)級(jí)的作業(yè)調(diào)度框架,來(lái)自 Quartz 開(kāi)發(fā)團(tuán)隊(duì)的信息,這是 Quartz 有史以來(lái)最大的、最值得興奮的一個(gè)版本。
該版本除了在性能上有所提升外,增加了如下新特性:
Scheduler.clear() 提供方便用于清除所有任務(wù)、觸發(fā)器和日程的方法
Scheduler.scheduleJobs(Map> triggersAndJobs, boolean replace) 方法可批量增加任務(wù)和觸發(fā)器
Scheduler.unscheduleJobs(List
Scheduler.deleteJobs(List
Scheduler.checkExists(JobKey jobKey) 和 Scheduler.heckExists(TriggerKey triggerKey) 提供用于檢測(cè)任務(wù)關(guān)鍵字的唯一性
JDBCJobStore now allows one set of tables to be used by multiple distinct scheduler instances
JDBCJobStore is now capable of storing non-core Trigger implementations without using BLOB columns, through the use of the new TriggerPersistenceDelegate interface, which can (optionally) be implemented by implementers of custom Trigger types.
JDBCJobStore 包含了 SybaseDelegate 用以提升跟 Sybase 數(shù)據(jù)庫(kù)的兼容性
Cron 表達(dá)式支持指定每月的最后一天和最后一周,例如 L-3 為每月的最后三天
包含調(diào)度信息的 XML 文件增加了用來(lái)指定啟動(dòng)時(shí)間和間隔時(shí)間的方法
From schema:
XML 文件支持為觸發(fā)器指定 priority 屬性
QuartzInitializerListener (and QuartzInitializerServlet) 支持新的參數(shù) "wait-on-shutdown"
增加核心任務(wù) DirectoryScanJob
Added ability to add the ServletContext into the SchedulerContext when using QuartzInitializerListener or QuartzInitializerServlet to initialize Quartz within a Java EE web application.
另外Quartz 2.0 不再使用 DBCP 做為數(shù)據(jù)庫(kù)連接池,而改用了 C3P0。
【編輯推薦】