亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jobexecutioncontext.java

?? Java中非常實用流控制工具
?? JAVA
字號:

/* 
 * Copyright 2004-2005 OpenSymphony 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 
 * use this file except in compliance with the License. You may obtain a copy 
 * of the License at 
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0 
 *   
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
 * License for the specific language governing permissions and limitations 
 * under the License.
 * 
 */

/*
 * Previously Copyright (c) 2001-2004 James House
 */
package org.quartz;

import java.util.Date;
import java.util.HashMap;

import org.quartz.spi.TriggerFiredBundle;

/**
 * <p>
 * A context bundle containing handles to various environment information, that
 * is given to a <code>{@link org.quartz.JobDetail}</code> instance as it is
 * executed, and to a <code>{@link Trigger}</code> instance after the
 * execution completes.
 * </p>
 * 
 * <p>
 * The <code>JobDataMap</code> found on this object (via the 
 * <code>getMergedJobDataMap()</code> method) serves as a convenience -
 * it is a merge of the <code>JobDataMap</code> found on the 
 * <code>JobDetail</code> and the one found on the <code>Trigger</code>, with 
 * the value in the latter overriding any same-named values in the former.
 * <i>It is thus considered a 'best practice' that the execute code of a Job
 * retrieve data from the JobDataMap found on this object</i>  NOTE: Do not
 * expect value 'set' into this JobDataMap to somehow be set back onto a
 * <code>StatefulJob</code>'s own JobDataMap.
 * </p>
 * 
 * <p>
 * <code>JobExecutionContext</code> s are also returned from the 
 * <code>Scheduler.getCurrentlyExecutingJobs()</code>
 * method. These are the same instances as those passed into the jobs that are
 * currently executing within the scheduler. The exception to this is when your
 * application is using Quartz remotely (i.e. via RMI) - in which case you get
 * a clone of the <code>JobExecutionContext</code>s, and their references to
 * the <code>Scheduler</code> and <code>Job</code> instances have been lost (a
 * clone of the <code>JobDetail</code> is still available - just not a handle
 * to the job instance that is running).
 * </p>
 * 
 * @see #getJobDetail()
 * @see #getScheduler()
 * @see #getMergedJobDataMap()
 * 
 * @see Job
 * @see Trigger
 * @see JobDataMap
 * 
 * @author James House
 */
public class JobExecutionContext implements java.io.Serializable {

    /*
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * 
     * Data members.
     * 
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     */

    private transient Scheduler scheduler;

    private Trigger trigger;

    private JobDetail jobDetail;
    
    private JobDataMap jobDataMap;

    private transient Job job;
    
    private Calendar calendar;

    private boolean recovering = false;

    private int numRefires = 0;

    private Date fireTime;

    private Date scheduledFireTime;

    private Date prevFireTime;

    private Date nextFireTime;
    
    private long jobRunTime = -1;
    
    private Object result;
    
    private HashMap data = new HashMap();

    /*
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * 
     * Constructors.
     * 
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     */

    /**
     * <p>
     * Create a JobExcecutionContext with the given context data.
     * </p>
     */
    public JobExecutionContext(Scheduler scheduler,
            TriggerFiredBundle firedBundle, Job job) {
        this.scheduler = scheduler;
        this.trigger = firedBundle.getTrigger();
        this.calendar = firedBundle.getCalendar();
        this.jobDetail = firedBundle.getJobDetail();
        this.job = job;
        this.recovering = firedBundle.isRecovering();
        this.fireTime = firedBundle.getFireTime();
        this.scheduledFireTime = firedBundle.getScheduledFireTime();
        this.prevFireTime = firedBundle.getPrevFireTime();
        this.nextFireTime = firedBundle.getNextFireTime();
        
        this.jobDataMap = new JobDataMap();
        this.jobDataMap.putAll(jobDetail.getJobDataMap());
        this.jobDataMap.putAll(trigger.getJobDataMap());
    }

    /*
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * 
     * Interface.
     * 
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     */

    /**
     * <p>
     * Get a handle to the <code>Scheduler</code> instance that fired the
     * <code>Job</code>.
     * </p>
     */
    public Scheduler getScheduler() {
        return scheduler;
    }

    /**
     * <p>
     * Get a handle to the <code>Trigger</code> instance that fired the
     * <code>Job</code>.
     * </p>
     */
    public Trigger getTrigger() {
        return trigger;
    }

    /**
     * <p>
     * Get a handle to the <code>Calendar</code> referenced by the <code>Trigger</code>
     * instance that fired the <code>Job</code>.
     * </p>
     */
    public Calendar getCalendar() {
        return calendar;
    }

    /**
     * <p>
     * If the <code>Job</code> is being re-executed because of a 'recovery'
     * situation, this method will return <code>true</code>.
     * </p>
     */
    public boolean isRecovering() {
        return recovering;
    }

    public void incrementRefireCount() {
        numRefires++;
    }

    public int getRefireCount() {
        return numRefires;
    }

    /**
     * <p>
     * Get the convenience <code>JobDataMap</code> of this execution context.
     * </p>
     * 
     * <p>
     * The <code>JobDataMap</code> found on this object serves as a convenience -
     * it is a merge of the <code>JobDataMap</code> found on the 
     * <code>JobDetail</code> and the one found on the <code>Trigger</code>, with 
     * the value in the latter overriding any same-named values in the former.
     * <i>It is thus considered a 'best practice' that the execute code of a Job
     * retrieve data from the JobDataMap found on this object.</i>
     * </p>
     * 
     * <p>NOTE: Do not
     * expect value 'set' into this JobDataMap to somehow be set back onto a
     * <code>StatefulJob</code>'s own JobDataMap.
     * </p>
     * 
     * <p>
     * Attempts to change the contents of this map typically result in an 
     * <code>IllegalStateException</code>.
     * </p>
     * 
     */
    public JobDataMap getMergedJobDataMap() {
        return jobDataMap;
    }

    /**
     * <p>
     * Get the <code>JobDetail</code> associated with the <code>Job</code>.
     * </p>
     */
    public JobDetail getJobDetail() {
        return jobDetail;
    }

    /**
     * <p>
     * Get the instance of the <code>Job</code> that was created for this
     * execution.
     * </p>
     * 
     * <p>
     * Note: The Job instance is not available through remote scheduler
     * interfaces.
     * </p>
     */
    public Job getJobInstance() {
        return job;
    }

    /**
     * The actual time the trigger fired. For instance the scheduled time may
     * have been 10:00:00 but the actual fire time may have been 10:00:03 if
     * the scheduler was too busy.
     * 
     * @return Returns the fireTime.
     * @see #getScheduledFireTime()
     */
    public Date getFireTime() {
        return fireTime;
    }

    /**
     * The scheduled time the trigger fired for. For instance the scheduled
     * time may have been 10:00:00 but the actual fire time may have been
     * 10:00:03 if the scheduler was too busy.
     * 
     * @return Returns the scheduledFireTime.
     * @see #getFireTime()
     */
    public Date getScheduledFireTime() {
        return scheduledFireTime;
    }

    public Date getPreviousFireTime() {
        return prevFireTime;
    }

    public Date getNextFireTime() {
        return nextFireTime;
    }

    public String toString() {
        return "JobExecutionContext:" + " trigger: '"
                + getTrigger().getFullName() + " job: "
                + getJobDetail().getFullName() + " fireTime: '" + getFireTime()
                + " scheduledFireTime: " + getScheduledFireTime()
                + " previousFireTime: '" + getPreviousFireTime()
                + " nextFireTime: " + getNextFireTime() + " isRecovering: "
                + isRecovering() + " refireCount: " + getRefireCount();
    }

    /**
     * Returns the result (if any) that the <code>Job</code> set before its 
     * execution completed (the type of object set as the result is entirely up 
     * to the particular job).
     * 
     * <p>
     * The result itself is meaningless to Quartz, but may be informative
     * to <code>{@link JobListener}s</code> or 
     * <code>{@link TriggerListener}s</code> that are watching the job's 
     * execution.
     * </p> 
     * 
     * @return Returns the result.
     */
    public Object getResult() {
        return result;
    }
    
    /**
     * Set the result (if any) of the <code>Job</code>'s execution (the type of 
     * object set as the result is entirely up to the particular job).
     * 
     * <p>
     * The result itself is meaningless to Quartz, but may be informative
     * to <code>{@link JobListener}s</code> or 
     * <code>{@link TriggerListener}s</code> that are watching the job's 
     * execution.
     * </p> 
     */
    public void setResult(Object result) {
        this.result = result;
    }
    
    /**
     * The amount of time the job ran for (in milliseconds).  The returned 
     * value will be -1 until the job has actually completed (or thrown an 
     * exception), and is therefore generally only useful to 
     * <code>JobListener</code>s and <code>TriggerListener</code>s.
     * 
     * @return Returns the jobRunTime.
     */
    public long getJobRunTime() {
        return jobRunTime;
    }
    
    /**
     * @param jobRunTime The jobRunTime to set.
     */
    public void setJobRunTime(long jobRunTime) {
        this.jobRunTime = jobRunTime;
    }

    /**
     * Put the specified value into the context's data map with the given key.
     * Possibly useful for sharing data between listeners and jobs.
     *
     * <p>NOTE: this data is volatile - it is lost after the job execution
     * completes, and all TriggerListeners and JobListeners have been 
     * notified.</p> 
     *  
     * @param key
     * @param value
     */
    public void put(Object key, Object value) {
        data.put(key, value);
    }
    
    /**
     * Get the value with the given key from the context's data map.
     * 
     * @param key
     */
    public Object get(Object key) {
        return data.get(key);
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级久久久| 狠狠网亚洲精品| 国产精品久久久久婷婷二区次| 欧美日韩一区三区| 97国产精品videossex| 福利一区二区在线观看| 国产精一区二区三区| 另类中文字幕网| 精品一区二区三区在线播放| 麻豆久久一区二区| 免费看欧美女人艹b| 久久精品99久久久| 久久99精品国产麻豆不卡| 免费高清不卡av| 精品一区二区精品| 国产不卡在线视频| 91小视频在线| 欧美日韩国产免费一区二区| 欧美日韩国产精品成人| 欧美精品久久99| 欧美α欧美αv大片| 欧美精品一区二区三区一线天视频| 日韩精品中文字幕一区二区三区| 欧美大片一区二区三区| 欧美激情中文字幕| 亚洲日本va午夜在线电影| 亚洲欧美在线aaa| 日韩综合一区二区| 国产一区二区三区久久悠悠色av| 成人免费视频视频| 精品视频在线免费看| 欧美精品一区二区三区高清aⅴ | 欧美刺激脚交jootjob| 精品福利一二区| 国产精品的网站| 爽好多水快深点欧美视频| 国产福利精品导航| 91久久精品一区二区三| 精品区一区二区| 亚洲欧美日韩久久| 麻豆专区一区二区三区四区五区| aaa欧美大片| 欧美r级电影在线观看| 国产精品久久免费看| 亚洲午夜免费电影| 国产盗摄一区二区| 欧美精品一卡两卡| 亚洲视频在线观看一区| 爽好久久久欧美精品| 波多野结衣中文字幕一区二区三区 | 91在线你懂得| 日韩精品一区二区三区蜜臀| 亚洲女人****多毛耸耸8| 国产一区美女在线| 欧美精品三级日韩久久| 亚洲图片另类小说| 国产成人精品亚洲午夜麻豆| 欧美一区二区视频在线观看2020| 亚洲色图欧美偷拍| 国产精品夜夜爽| 日韩一区二区三区观看| 亚洲一区二区三区四区的| 成人妖精视频yjsp地址| www精品美女久久久tv| 91在线视频网址| 成人激情动漫在线观看| 日本中文字幕一区二区有限公司| 成人毛片视频在线观看| 亚洲精品一线二线三线无人区| 午夜av区久久| 欧美日韩国产小视频在线观看| 亚洲毛片av在线| 色网综合在线观看| 国产精品美女一区二区| 成人手机在线视频| 国产精品嫩草久久久久| 成人黄页毛片网站| 国产精品久久久久9999吃药| 国产白丝网站精品污在线入口| 国产亚洲欧美色| 国产精品99久| 久久综合丝袜日本网| 国产一区二区三区精品视频| 久久久久久久久久久久电影| 国产精品一二三四| 久久久久久**毛片大全| 国产99久久久久久免费看农村| 久久久精品免费免费| 成人免费看片app下载| 成人免费一区二区三区视频| 91免费国产在线观看| 亚洲综合自拍偷拍| 欧美日韩免费观看一区二区三区 | 91一区二区在线| 一区二区三区免费在线观看| 欧美性猛交xxxx黑人交| 青青草97国产精品免费观看 | 日韩区在线观看| 狠狠狠色丁香婷婷综合激情| 国产日韩视频一区二区三区| 国产成人精品三级| 亚洲免费在线看| 91精品国产欧美一区二区18| 国产精品一二三区在线| 亚洲视频一区二区在线| 欧美剧情片在线观看| 国产精品自拍网站| 亚洲精品视频在线看| 91精品国产综合久久精品性色| 久久精品国产99国产精品| 国产精品色噜噜| 7777精品伊人久久久大香线蕉超级流畅 | 一区二区不卡在线视频 午夜欧美不卡在 | 久久久精品tv| 99re这里只有精品6| 亚洲va韩国va欧美va精品| 精品福利在线导航| 欧美在线你懂得| 国产经典欧美精品| 性久久久久久久| 国产精品免费免费| 日韩午夜激情免费电影| 91麻豆蜜桃一区二区三区| 久久99国产精品尤物| 亚洲精品第1页| 国产亚洲成av人在线观看导航| 欧美日韩精品一区二区在线播放| 国产传媒日韩欧美成人| 日本视频免费一区| 日韩毛片视频在线看| 精品播放一区二区| 欧美人动与zoxxxx乱| 99国产欧美久久久精品| 国产在线一区观看| 天堂va蜜桃一区二区三区| 亚洲欧美日韩一区| 久久精品视频在线看| 欧美www视频| 在线不卡欧美精品一区二区三区| 97精品视频在线观看自产线路二| 国产盗摄一区二区三区| 久久 天天综合| 男人的j进女人的j一区| 婷婷丁香久久五月婷婷| 亚洲最大成人网4388xx| 亚洲精品免费视频| 中文字幕一区免费在线观看| 日本一区二区三区在线观看| 久久精品一区二区| 久久精品欧美日韩精品| 欧美大片顶级少妇| 日韩欧美专区在线| 4438x亚洲最大成人网| 欧美精品久久天天躁| 欧美日韩三级在线| 欧美精品三级日韩久久| 777午夜精品免费视频| 欧美日韩成人综合在线一区二区 | 亚洲欧美日韩国产一区二区三区| 欧美国产一区二区| 久久久777精品电影网影网| 91麻豆精品国产91久久久久久久久| 欧美这里有精品| 欧美三级韩国三级日本一级| 欧美日韩高清在线播放| 欧美午夜一区二区三区| av男人天堂一区| 色老综合老女人久久久| 精品免费视频一区二区| 91麻豆精品国产自产在线观看一区| 欧美日韩国产综合久久| 欧美网站一区二区| 欧美精品黑人性xxxx| 日韩欧美国产一区在线观看| 精品国产自在久精品国产| 国产欧美一区在线| 中文字幕中文字幕中文字幕亚洲无线 | 欧美精品成人一区二区三区四区| 777午夜精品视频在线播放| 精品久久一区二区| 国产午夜精品美女毛片视频| 国产精品美女视频| 一区二区三区日本| 久久激情五月婷婷| 成人激情免费电影网址| 欧美色图在线观看| 正在播放一区二区| 欧美国产一区二区| 亚洲福利一区二区三区| 激情欧美一区二区三区在线观看| 懂色av中文字幕一区二区三区| 91久久免费观看| 日韩精品一区二区三区视频播放| 欧美国产成人在线| 日韩激情视频在线观看| 国产福利精品导航| 欧美裸体bbwbbwbbw| 国产三级一区二区三区| 婷婷国产v国产偷v亚洲高清| fc2成人免费人成在线观看播放|