Giter VIP home page Giter VIP logo

quartz-demo's Introduction

项目介绍

quartz的学习

内容

关键API (摘自官方github)

  1. Scheduler - the main API for interacting with the scheduler.
  2. Job - an interface to be implemented by components that you wish to have executed by the scheduler.
  3. JobDetail - used to define instances of Jobs.
  4. Trigger - a component that defines the schedule upon which a given Job will be executed.
  5. JobBuilder - used to define/build JobDetail instances, which define instances of Jobs.
  6. TriggerBuilder - used to define/build Trigger instances.

其他重要API

  1. JobDataMap - 如何在两次执行之间跟踪作业的状态
    • context.getJobDetail().getJobDataMap();
    • context.getTrigger().getJobDataMap();
    • context.getMergedJobDataMap(); 上述两个JobDataMap的合并,后者的值会覆盖前者的值。
  2. ScheduleBuilder
  3. Calendar
  4. TriggerListener
  5. JobListener - scheduler.getListenerManager().addJobListener(myJobListener, KeyMatcher.jobKeyEquals(new JobKey("myJobName", "myJobGroup")));
  6. SchedulerListener
  7. JobStore - RAMJobStore, JDBCJobStore, TerracottaJobStore。后两种支持集群
  8. SchedulerPlugin

常用注解

  1. @DisallowConcurrentExecution
  2. @PersistJobDataAfterExecution

触发器重要属性

  1. Priority。- 当同一时刻,需要触发执行的job,多于工作线程时,优先级的优先执行。
  2. Misfire Instructions

设计模式

显然JobDetail和Trigger和构建都是使用了建造者模式,可以看下源码看看quartz的建造者模式是怎么写的。

quartz-demo's People

Contributors

yuenushan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.