由于想自己扩展quartz的job以及trigger的查询方法,改为支持分页的,所以这里对着一些api查看下相应的表映射。

job

scheduler.getJobKeys(GroupMatcher.anyJobGroup());
scheduler.getJobDetail(JobKey.jobKey(name,group));

quartz-2.3.0-sources.jar!/org/quartz/impl/jdbcjobstore/StdJDBCDelegate.java

String SELECT_JOBS_IN_GROUP_LIKE = "SELECT " + COL_JOB_NAME + ", " + COL_JOB_GROUP
            + " FROM " + TABLE_PREFIX_SUBST + TABLE_JOB_DETAILS + " WHERE "
            + COL_SCHEDULER_NAME + " = " + SCHED_NAME_SUBST
            + " AND " + COL_JOB_GROUP + " LIKE ?";

直接查job_details表

trigger

scheduler.getTriggerKeys(GroupMatcher.triggerGroupEquals(group));
scheduler.getTrigger(TriggerKey.triggerKey(name,group));

quartz-2.3.0-sources.jar!/org/quartz/impl/jdbcjobstore/StdJDBCDelegate.java

String SELECT_TRIGGERS_IN_GROUP_LIKE = "SELECT "
            + COL_TRIGGER_NAME + ", " + COL_TRIGGER_GROUP + " FROM " + TABLE_PREFIX_SUBST + TABLE_TRIGGERS
            + " WHERE " + COL_SCHEDULER_NAME + " = " + SCHED_NAME_SUBST
            + " AND " + COL_TRIGGER_GROUP + " LIKE ?";

查TRIGGERS表

TRIGGERS表

  • QRTZ_TRIGGERS

trigger信息的总表

  • QRTZ_SIMPLE_TRIGGERS

simple trigger类型的详情表,通过trigger_name与总表关联

  • QRTZ_CRON_TRIGGERS

cron trigger类型的详情表,通过trigger_name与总表关联

  • QRTZ_BLOG_TRIGGERS

用户用JDBC自定义的Trigger类型的详情表

doc


codecraft
11.9k 声望2k 粉丝

当一个代码的工匠回首往事时,不因虚度年华而悔恨,也不因碌碌无为而羞愧,这样,当他老的时候,可以很自豪告诉世人,我曾经将代码注入生命去打造互联网的浪潮之巅,那是个很疯狂的时代,我在一波波的浪潮上留下...


引用和评论

0 条评论