Quartz深入淺出(一),Quartz深入淺出(
- 什麼是Quartz
- Quartz能幹什麼/應用情境
- 同類架構對比
- 資源
- 原始碼 svn:http://svn.terracotta.org/svn/quartz
- 本文章採用的是2.21版本:CSDN下載:http://download.csdn.net/detail/chenweitang123/7636703
- 例子Demo:CSDN下載:整理完後上傳.
架構分析
Quartz中的設計模式
Factory模式
Quartz項目中大量使用組件模式,外掛程式式設計,可插拔,耦合性低,易擴充,開發人員可自行定義自己的Job、Trigger等組件
鏈式寫法,Quartz中大量使用鏈式寫法,與jQuery的寫法有幾分相似,實現也比較簡單,如:
架構核心分析
JobExecutionContext -- JOB上下文,儲存著Trigger、 JobDeaitl 等資訊,JOB的execute方法傳遞的參數就是對象的執行個體
Scheduler -- 調度器
JOB --任務對象
Trigger
ThreadPool -- 為Quartz運行任務時提供了一些線程
-----以上是Quartz涉及到的一些關鍵對象,詳細的內容如有機會會在後續的文章中展開!
Quartz類圖
思想
一句話看懂Quartz
造一個句子,深入淺出地說清一個問題
Life imprisonment in Canada means that an offender will be under state supervision, whether in prison or in the community, for the rest of their life. The longest sentence that may be awarded in Canada is life imprisonment without parole eligibility for 25 years. For example, first degree murder carries a mandatory sentence of life imprisonment without eligibility for parole for 25 years. Second degree murder carries a mandatory sentence of life imprisonment without eligibility for parole for between 10 and 25 years.
There is no guarantee that parole will be granted to an offender. If the National Parole Board determines that an offender still poses a risk to society that person may be detained in prison past the parole eligibility period.
深入淺出猜一生肖?
鼠,鼠洞入口都是找不著的地方,出口都是找得著的地方