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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? scheduledtimertask.java

?? spring framework 2.5.4源代碼
?? JAVA
字號:
/*
 * Copyright 2002-2007 the original author or authors.
 *
 * 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.
 */

package org.springframework.scheduling.timer;

import java.util.TimerTask;

/**
 * JavaBean that describes a scheduled {@link TimerTask}, consisting of the
 * {@link TimerTask} itself or a {@link Runnable} to create a {@link TimerTask}
 * for and a delay plus period. The period needs to be specified; there is
 * no point in a default for it.
 *
 * <p>The JDK's {@link java.util.Timer} facility does not offer sophisticated
 * scheduling options such as cron expressions. Consider using Quartz for
 * such advanced needs.
 *
 * <p>Note that the {@link java.util.Timer} mechanism uses a {@link TimerTask}
 * instance that is shared between repeated executions, in contrast to Quartz
 * which creates a new Job instance for each execution.
 *
 * @author Juergen Hoeller
 * @since 19.02.2004
 * @see java.util.TimerTask
 * @see java.util.Timer#schedule(TimerTask, long, long)
 * @see java.util.Timer#scheduleAtFixedRate(TimerTask, long, long)
 */
public class ScheduledTimerTask {

	private TimerTask timerTask;

	private long delay = 0;

	private long period = -1;

	private boolean fixedRate = false;


	/**
	 * Create a new ScheduledTimerTask,
	 * to be populated via bean properties.
	 * @see #setTimerTask
	 * @see #setDelay
	 * @see #setPeriod
	 * @see #setFixedRate
	 */
	public ScheduledTimerTask() {
	}

	/**
	 * Create a new ScheduledTimerTask, with default
	 * one-time execution without delay.
	 * @param timerTask the TimerTask to schedule
	 */
	public ScheduledTimerTask(TimerTask timerTask) {
		this.timerTask = timerTask;
	}

	/**
	 * Create a new ScheduledTimerTask, with default
	 * one-time execution with the given delay.
	 * @param timerTask the TimerTask to schedule
	 * @param delay the delay before starting the task for the first time (ms)
	 */
	public ScheduledTimerTask(TimerTask timerTask, long delay) {
		this.timerTask = timerTask;
		this.delay = delay;
	}

	/**
	 * Create a new ScheduledTimerTask.
	 * @param timerTask the TimerTask to schedule
	 * @param delay the delay before starting the task for the first time (ms)
	 * @param period the period between repeated task executions (ms)
	 * @param fixedRate whether to schedule as fixed-rate execution
	 */
	public ScheduledTimerTask(TimerTask timerTask, long delay, long period, boolean fixedRate) {
		this.timerTask = timerTask;
		this.delay = delay;
		this.period = period;
		this.fixedRate = fixedRate;
	}

	/**
	 * Create a new ScheduledTimerTask, with default
	 * one-time execution without delay.
	 * @param timerTask the Runnable to schedule as TimerTask
	 */
	public ScheduledTimerTask(Runnable timerTask) {
		setRunnable(timerTask);
	}

	/**
	 * Create a new ScheduledTimerTask, with default
	 * one-time execution with the given delay.
	 * @param timerTask the Runnable to schedule as TimerTask
	 * @param delay the delay before starting the task for the first time (ms)
	 */
	public ScheduledTimerTask(Runnable timerTask, long delay) {
		setRunnable(timerTask);
		this.delay = delay;
	}

	/**
	 * Create a new ScheduledTimerTask.
	 * @param timerTask the Runnable to schedule as TimerTask
	 * @param delay the delay before starting the task for the first time (ms)
	 * @param period the period between repeated task executions (ms)
	 * @param fixedRate whether to schedule as fixed-rate execution
	 */
	public ScheduledTimerTask(Runnable timerTask, long delay, long period, boolean fixedRate) {
		setRunnable(timerTask);
		this.delay = delay;
		this.period = period;
		this.fixedRate = fixedRate;
	}


	/**
	 * Set the Runnable to schedule as TimerTask.
	 * @see DelegatingTimerTask
	 */
	public void setRunnable(Runnable timerTask) {
		this.timerTask = new DelegatingTimerTask(timerTask);
	}

	/**
	 * Set the TimerTask to schedule.
	 */
	public void setTimerTask(TimerTask timerTask) {
		this.timerTask = timerTask;
	}

	/**
	 * Return the TimerTask to schedule.
	 */
	public TimerTask getTimerTask() {
		return this.timerTask;
	}

	/**
	 * Set the delay before starting the task for the first time,
	 * in milliseconds. Default is 0, immediately starting the
	 * task after successful scheduling.
	 */
	public void setDelay(long delay) {
		this.delay = delay;
	}

	/**
	 * Return the delay before starting the job for the first time.
	 */
	public long getDelay() {
		return this.delay;
	}

	/**
	 * Set the period between repeated task executions, in milliseconds.
	 * <p>Default is -1, leading to one-time execution. In case of a positive
	 * value, the task will be executed repeatedly, with the given interval
	 * inbetween executions.
	 * <p>Note that the semantics of the period value vary between fixed-rate
	 * and fixed-delay execution.
	 * <p><b>Note:</b> A period of 0 (for example as fixed delay) is <i>not</i>
	 * supported, simply because <code>java.util.Timer</code> itself does not
	 * support it. Hence a value of 0 will be treated as one-time execution;
	 * however, that value should never be specified explicitly in the first place!
	 * @see #setFixedRate
	 * @see #isOneTimeTask()
	 * @see java.util.Timer#schedule(TimerTask, long, long)
	 */
	public void setPeriod(long period) {
		this.period = period;
	}

	/**
	 * Return the period between repeated task executions.
	 */
	public long getPeriod() {
		return this.period;
	}

	/**
	 * Is this task only ever going to execute once?
	 * @return <code>true</code> if this task is only ever going to execute once
	 * @see #getPeriod()
	 */
	public boolean isOneTimeTask() {
		return (this.period <= 0);
	}

	/**
	 * Set whether to schedule as fixed-rate execution, rather than
	 * fixed-delay execution. Default is "false", that is, fixed delay.
	 * <p>See Timer javadoc for details on those execution modes.
	 * @see java.util.Timer#schedule(TimerTask, long, long)
	 * @see java.util.Timer#scheduleAtFixedRate(TimerTask, long, long)
	 */
	public void setFixedRate(boolean fixedRate) {
		this.fixedRate = fixedRate;
	}

	/**
	 * Return whether to schedule as fixed-rate execution.
	 */
	public boolean isFixedRate() {
		return this.fixedRate;
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人av资源下载| 麻豆精品精品国产自在97香蕉| 91精品国产一区二区三区| 99久久精品国产一区二区三区 | 日韩一区二区三区精品视频| 在线看日韩精品电影| 国产福利不卡视频| 久久久久久久综合狠狠综合| 成人欧美一区二区三区在线播放| 777午夜精品免费视频| 国产精品久久毛片a| 91精品国产色综合久久不卡电影 | 91精品国产综合久久蜜臀| 青青草国产成人99久久| 日本丶国产丶欧美色综合| 毛片不卡一区二区| 亚洲午夜久久久久中文字幕久| 成人欧美一区二区三区| 欧美精品在线视频| 欧美一级二级三级蜜桃| 午夜精品视频一区| 成人高清视频免费观看| 日韩高清一区在线| 久久亚洲欧美国产精品乐播| 激情深爱一区二区| 亚洲图片欧美视频| 国产日韩欧美综合一区| 在线综合视频播放| 日韩欧美一级二级三级| 韩国毛片一区二区三区| 国产精品国产三级国产| 久久精品国产网站| 麻豆精品在线视频| 日本成人在线一区| 欧美aⅴ一区二区三区视频| 美女免费视频一区二区| 日韩精品久久理论片| 国产精品免费久久| 中文字幕五月欧美| 成人精品国产一区二区4080| 国产一区二区影院| 亚洲一二三四在线| 成人深夜福利app| 久久免费视频一区| 欧美精选一区二区| 欧美日韩亚洲综合| 成人一道本在线| 91麻豆精品国产自产在线观看一区| 国产乱码字幕精品高清av| 日韩欧美国产午夜精品| 成人一道本在线| 国产视频一区在线观看| av电影在线观看完整版一区二区| 欧美国产精品专区| 精品国产一区二区三区av性色 | 国产高清久久久| 欧美日韩国产欧美日美国产精品| 亚洲女爱视频在线| 亚洲成人黄色影院| 91福利小视频| 首页国产欧美日韩丝袜| 色婷婷综合激情| 亚洲国产精品久久久男人的天堂 | aaa国产一区| 欧美久久久久免费| 久久夜色精品国产欧美乱极品| 国产suv精品一区二区883| av色综合久久天堂av综合| 亚洲国产美国国产综合一区二区| 亚洲精品欧美激情| 久久精品久久精品| 99re这里只有精品视频首页| 91精品中文字幕一区二区三区| 亚洲男人天堂av| 欧美日韩一区不卡| 国产福利电影一区二区三区| 欧美怡红院视频| 99热精品国产| 蜜臀av性久久久久蜜臀av麻豆| 69av一区二区三区| 日本一不卡视频| 国产亚洲精品7777| 欧美久久久久久久久中文字幕| 亚洲少妇屁股交4| 亚洲成人av免费| 91九色02白丝porn| 香蕉av福利精品导航| 一区二区三区波多野结衣在线观看| 精品亚洲成a人在线观看| 国产精品69毛片高清亚洲| 精品一区二区三区视频| 国产一区二区三区香蕉| 一区二区三区四区在线免费观看| 欧美探花视频资源| 成人欧美一区二区三区白人| 亚洲品质自拍视频网站| 欧美极品少妇xxxxⅹ高跟鞋| 午夜精品aaa| 一区二区在线电影| 日韩三级中文字幕| 日本视频在线一区| 成人天堂资源www在线| 日韩欧美一级特黄在线播放| 国产精品热久久久久夜色精品三区| 亚洲人xxxx| 精品久久国产字幕高潮| 亚洲最大色网站| 国产中文一区二区三区| 91麻豆免费观看| 青青草原综合久久大伊人精品| 美女视频网站黄色亚洲| 日韩一级完整毛片| 中文字幕一区二区三区在线不卡| 国产一区二区免费看| 国产不卡视频一区| 日本成人在线网站| 欧美视频精品在线观看| 免费久久99精品国产| 91免费版在线看| 亚洲一级二级在线| 日韩欧美在线网站| 欧洲人成人精品| 国产精品每日更新在线播放网址| 亚洲专区一二三| 亚洲品质自拍视频| 国产精品99久久久| 欧美视频一二三区| 国产日韩欧美综合一区| 国产成人在线视频网站| 欧美福利电影网| 成人av资源下载| 亚洲精品伦理在线| 久久精品国产久精国产爱| 成人欧美一区二区三区小说| 9191国产精品| 欧美丰满一区二区免费视频| 国产精品一线二线三线精华| 亚洲视频你懂的| 精品一区二区三区免费视频| 欧美va在线播放| 亚洲自拍都市欧美小说| 亚洲h在线观看| 91麻豆精品国产91| 久久久久久麻豆| 精品中文av资源站在线观看| 久久色在线观看| 成人免费视频免费观看| 欧美日韩高清影院| gogo大胆日本视频一区| 最新久久zyz资源站| 韩国三级中文字幕hd久久精品| 国产盗摄视频一区二区三区| 国产日韩欧美在线一区| 91精品国产综合久久精品性色 | 欧美一区二区在线看| 免费成人在线影院| 日韩欧美一区二区三区在线| 蜜臀精品一区二区三区在线观看 | 美国av一区二区| 亚洲一区成人在线| 蜜桃久久av一区| 99久久久久久| 亚洲视频一区在线观看| 777奇米四色成人影色区| 国产精品成人网| 在线精品视频免费观看| 欧美久久久久久久久中文字幕| 国产美女在线精品| 国产精品一二三四五| 日韩av在线播放中文字幕| 亚洲免费观看在线观看| 日韩西西人体444www| 丁香网亚洲国际| 欧美精品一区二区不卡 | 亚洲一区在线观看免费观看电影高清| 91一区二区在线观看| 亚洲免费观看高清| 成人网在线播放| 欧美日韩精品福利| 亚洲男人的天堂在线观看| 69堂精品视频| 欧美日韩久久久| 欧美日韩一区二区在线观看视频| 欧美日韩你懂得| 一区二区在线免费观看| 日韩**一区毛片| 日韩美女主播在线视频一区二区三区| 91行情网站电视在线观看高清版| 色老头久久综合| 国产精品欧美综合在线| 国产色一区二区| 色综合久久综合网| 粉嫩欧美一区二区三区高清影视 | 久久精品欧美日韩| 日韩欧美的一区二区| 国产乱人伦偷精品视频不卡| 国产乱码精品一区二区三区av| 懂色中文一区二区在线播放| 中文字幕一区二| 亚洲伦理在线免费看|