Spring+quartz实现集群任务调度

来源:互联网 发布:淘宝违规申诉成功率 编辑:程序博客网 时间:2024/06/09 16:38

Spring+quartz实现集群任务调度

关键点:


quartz中的主要实现类:

JobStoreTX
通过数据库锁(行锁)来实现多个节点的访问顺寻控制。

例如mysql:

select * from QRTZ_LOCKS t where t.lock_name='TRIGGER_ACCESS' for update

锁定当前行(t.lock_name为主键,具体参见mysql innodb表所行锁)。其它数据库访问该行的会话只能阻塞等待锁的释放。


quartz的 svn 地址(可以下载查看源码、具体的见表sql):

http://svn.terracotta.org/svn/quartz


参考 :

 http://tech.meituan.com/mt-crm-quartz.html

http://shmilyaw-hotmail-com.iteye.com/blog/2169156

http://www.tuicool.com/articles/B3qeUrB

http://blog.csdn.net/gyb2013/article/details/7415502

http://ismezy.iteye.com/blog/1564076

http://www.quartz-scheduler.org/documentation/quartz-2.2.x/quick-start

0 0
原创粉丝点击