• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IntervalUnit类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.quartz.DateBuilder.IntervalUnit的典型用法代码示例。如果您正苦于以下问题:Java IntervalUnit类的具体用法?Java IntervalUnit怎么用?Java IntervalUnit使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IntervalUnit类属于org.quartz.DateBuilder包,在下文中一共展示了IntervalUnit类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getTriggerPropertyBundle

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
@Override
protected TriggerPropertyBundle getTriggerPropertyBundle(SimplePropertiesTriggerProperties props) {

    TimeZone tz = null; // if we use null, that's ok as system default tz will be used
    String tzId = props.getString2();
    if(tzId != null && tzId.trim().length() != 0) // there could be null entries from previously released versions
        tz = TimeZone.getTimeZone(tzId);
    
    ScheduleBuilder<?> sb = CalendarIntervalScheduleBuilder.calendarIntervalSchedule()
        .withInterval(props.getInt1(), IntervalUnit.valueOf(props.getString1()))
        .inTimeZone(tz)
        .preserveHourOfDayAcrossDaylightSavings(props.isBoolean1())
        .skipDayIfHourDoesNotExist(props.isBoolean2());
    
    int timesTriggered = props.getInt2();
    
    String[] statePropertyNames = { "timesTriggered" };
    Object[] statePropertyValues = { timesTriggered };

    return new TriggerPropertyBundle(sb, statePropertyNames, statePropertyValues);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:22,代码来源:CalendarIntervalTriggerPersistenceDelegate.java


示例2: addScheduledJob

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
/** {@inheritDoc} */
public String addScheduledJob(int interval, IScheduledJob job) {
    String name = getJobName();
    // Store reference to applications job and service		
    JobDataMap jobData = new JobDataMap();
    jobData.put(QuartzSchedulingServiceJob.SCHEDULING_SERVICE, this);
    jobData.put(QuartzSchedulingServiceJob.SCHEDULED_JOB, job);
    // detail
    JobDetail jobDetail = JobBuilder.newJob(QuartzSchedulingServiceJob.class).withIdentity(name).usingJobData(jobData).build();
    // create trigger that fires indefinitely every <interval> milliseconds
    Trigger trigger = TriggerBuilder.newTrigger().withIdentity(String.format("Trigger_%s", name)).startAt(DateBuilder.futureDate(1, IntervalUnit.MILLISECOND)).forJob(jobDetail).withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInMilliseconds(interval).repeatForever()).build();
    // store keys by name
    TriggerKey tKey = trigger.getKey();
    JobKey jKey = trigger.getJobKey();
    log.debug("Job key: {} Trigger key: {}", jKey, tKey);
    ScheduledJobKey key = new ScheduledJobKey(tKey, jKey);
    keyMap.put(name, key);
    // schedule
    scheduleJob(trigger, jobDetail);
    return name;
}
 
开发者ID:Red5,项目名称:red5-server-common,代码行数:22,代码来源:QuartzSchedulingService.java


示例3: addScheduledJobAfterDelay

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
/** {@inheritDoc} */
public String addScheduledJobAfterDelay(int interval, IScheduledJob job, int delay) {
    String name = getJobName();
    // Store reference to applications job and service		
    JobDataMap jobData = new JobDataMap();
    jobData.put(QuartzSchedulingServiceJob.SCHEDULING_SERVICE, this);
    jobData.put(QuartzSchedulingServiceJob.SCHEDULED_JOB, job);
    // detail
    JobDetail jobDetail = JobBuilder.newJob(QuartzSchedulingServiceJob.class).withIdentity(name, null).usingJobData(jobData).build();
    // Create trigger that fires indefinitely every <interval> milliseconds
    Trigger trigger = TriggerBuilder.newTrigger().withIdentity(String.format("Trigger_%s", name)).startAt(DateBuilder.futureDate(delay, IntervalUnit.MILLISECOND)).forJob(jobDetail).withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInMilliseconds(interval).repeatForever()).build();
    // store keys by name
    TriggerKey tKey = trigger.getKey();
    JobKey jKey = trigger.getJobKey();
    log.debug("Job key: {} Trigger key: {}", jKey, tKey);
    ScheduledJobKey key = new ScheduledJobKey(tKey, jKey);
    keyMap.put(name, key);
    // schedule
    scheduleJob(trigger, jobDetail);
    return name;
}
 
开发者ID:Red5,项目名称:red5-server-common,代码行数:22,代码来源:QuartzSchedulingService.java


示例4: setRepeatIntervalUnit

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
/**
 * <p>Set the interval unit - the time unit on with the interval applies.</p>
 * 
 * @param intervalUnit The repeat interval unit. The only intervals that are valid for this type of trigger are 
 * {@link IntervalUnit#SECOND}, {@link IntervalUnit#MINUTE}, and {@link IntervalUnit#HOUR}.
 */
public void setRepeatIntervalUnit(IntervalUnit intervalUnit) {
    if (repeatIntervalUnit == null || 
            !((repeatIntervalUnit.equals(IntervalUnit.SECOND) || 
            repeatIntervalUnit.equals(IntervalUnit.MINUTE) || 
            repeatIntervalUnit.equals(IntervalUnit.HOUR))))
        throw new IllegalArgumentException("Invalid repeat IntervalUnit (must be SECOND, MINUTE or HOUR).");
    this.repeatIntervalUnit = intervalUnit;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:DailyTimeIntervalTriggerImpl.java


示例5: validate

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
/**
 * <p>
 * Validates whether the properties of the <code>JobDetail</code> are
 * valid for submission into a <code>Scheduler</code>.
 * 
 * @throws IllegalStateException
 *           if a required property (such as Name, Group, Class) is not
 *           set.
 */
@Override
public void validate() throws SchedulerException {
    super.validate();
    
    if (repeatIntervalUnit == null || !(repeatIntervalUnit.equals(IntervalUnit.SECOND) || 
            repeatIntervalUnit.equals(IntervalUnit.MINUTE) ||repeatIntervalUnit.equals(IntervalUnit.HOUR)))
        throw new SchedulerException("Invalid repeat IntervalUnit (must be SECOND, MINUTE or HOUR).");
    if (repeatInterval < 1) {
        throw new SchedulerException("Repeat Interval cannot be zero.");
    }
    
    // Ensure interval does not exceed 24 hours
    long secondsInHour = 24 * 60 * 60L;
    if (repeatIntervalUnit == IntervalUnit.SECOND && repeatInterval > secondsInHour) {
        throw new SchedulerException("repeatInterval can not exceed 24 hours (" + secondsInHour + " seconds). Given " + repeatInterval);
    }
    if (repeatIntervalUnit == IntervalUnit.MINUTE && repeatInterval > secondsInHour / 60L) {
        throw new SchedulerException("repeatInterval can not exceed 24 hours (" + secondsInHour / 60L + " minutes). Given " + repeatInterval);
    }
    if (repeatIntervalUnit == IntervalUnit.HOUR && repeatInterval > 24 ) {
        throw new SchedulerException("repeatInterval can not exceed 24 hours. Given " + repeatInterval + " hours.");
    }        
    
    // Ensure timeOfDay is in order.
    if (getEndTimeOfDay() != null && !getStartTimeOfDay().before(getEndTimeOfDay())) {
        throw new SchedulerException("StartTimeOfDay " + startTimeOfDay + " should not come after endTimeOfDay " + endTimeOfDay);
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:38,代码来源:DailyTimeIntervalTriggerImpl.java


示例6: startLoading

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
public void startLoading() {
    if (execService != null) {
        return;
    }
    log.trace("starting execution...");

    int i = 0;
    for (final CalendarRuntime eventRuntime : EventStorage.getInstance().getEventCache().values()) {
        try {
            JobDetail job = JobBuilder.newJob().ofType(EventReloaderJob.class)
                    .usingJobData(EventReloaderJob.KEY_CONFIG, eventRuntime.getConfig().getKey())
                    .withIdentity(eventRuntime.getConfig().getKey(), JOB_NAME_EVENT_RELOADER).storeDurably()
                    .build();
            this.scheduler.addJob(job, false);
            SimpleTrigger jobTrigger = TriggerBuilder.newTrigger().forJob(job)
                    .withIdentity(eventRuntime.getConfig().getKey(), JOB_NAME_EVENT_RELOADER)
                    .startAt(DateBuilder.futureDate(10 + i, IntervalUnit.SECOND)).withSchedule(SimpleScheduleBuilder
                            .repeatMinutelyForever(eventRuntime.getConfig().getReloadMinutes()))
                    .build();
            this.scheduler.scheduleJob(jobTrigger);
            log.info("reload job scheduled for: {}", eventRuntime.getConfig().getKey());
        } catch (SchedulerException e) {
            log.warn("Cannot schedule calendar reloader", e);
        }
        // next event 10 seconds later
        i += 10;
    }

}
 
开发者ID:openhab,项目名称:openhab1-addons,代码行数:30,代码来源:CalDavLoaderImpl.java


示例7: getRepeatIntervalUnit

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
public IntervalUnit getRepeatIntervalUnit() {
    return repeatIntervalUnit;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:4,代码来源:DailyTimeIntervalTriggerImpl.java


示例8: setRepeatIntervalUnit

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
/**
 * <p>Set the interval unit - the time unit on with the interval applies.</p>
 */
public void setRepeatIntervalUnit(IntervalUnit intervalUnit) {
    this.repeatIntervalUnit = intervalUnit;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:7,代码来源:CalendarIntervalTriggerImpl.java


示例9: getFinalFireTime

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
/**
 * <p>
 * Returns the final time at which the <code>DateIntervalTrigger</code> will
 * fire, if there is no end time set, null will be returned.
 * </p>
 * 
 * <p>
 * Note that the return time may be in the past.
 * </p>
 */
@Override
public Date getFinalFireTime() {
    if (complete || getEndTime() == null) {
        return null;
    }

    // back up a second from end time
    Date fTime = new Date(getEndTime().getTime() - 1000L);
    // find the next fire time after that
    fTime = getFireTimeAfter(fTime, true);
    
    // the the trigger fires at the end time, that's it!
    if(fTime.equals(getEndTime()))
        return fTime;
    
    // otherwise we have to back up one interval from the fire time after the end time
    
    Calendar lTime = Calendar.getInstance();
    if(timeZone != null)
        lTime.setTimeZone(timeZone);
    lTime.setTime(fTime);
    lTime.setLenient(true);
    
    if(getRepeatIntervalUnit().equals(IntervalUnit.SECOND)) {
        lTime.add(java.util.Calendar.SECOND, -1 * getRepeatInterval());
    }
    else if(getRepeatIntervalUnit().equals(IntervalUnit.MINUTE)) {
        lTime.add(java.util.Calendar.MINUTE, -1 * getRepeatInterval());
    }
    else if(getRepeatIntervalUnit().equals(IntervalUnit.HOUR)) {
        lTime.add(java.util.Calendar.HOUR_OF_DAY, -1 * getRepeatInterval());
    }
    else if(getRepeatIntervalUnit().equals(IntervalUnit.DAY)) {
        lTime.add(java.util.Calendar.DAY_OF_YEAR, -1 * getRepeatInterval());
    }
    else if(getRepeatIntervalUnit().equals(IntervalUnit.WEEK)) {
        lTime.add(java.util.Calendar.WEEK_OF_YEAR, -1 * getRepeatInterval());
    }
    else if(getRepeatIntervalUnit().equals(IntervalUnit.MONTH)) {
        lTime.add(java.util.Calendar.MONTH, -1 * getRepeatInterval());
    }
    else if(getRepeatIntervalUnit().equals(IntervalUnit.YEAR)) {
        lTime.add(java.util.Calendar.YEAR, -1 * getRepeatInterval());
    }

    return lTime.getTime();
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:58,代码来源:CalendarIntervalTriggerImpl.java


示例10: endingDailyAfterCount

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
/**
 * Calculate and set the endTimeOfDay using count, interval and starTimeOfDay. This means
 * that these must be set before this method is call.
 * 
 * @return the updated DailyTimeIntervalScheduleBuilder
 */
public DailyTimeIntervalScheduleBuilder endingDailyAfterCount(int count) {
    if(count <=0)
        throw new IllegalArgumentException("Ending daily after count must be a positive number!");
    
    if(startTimeOfDay == null)
        throw new IllegalArgumentException("You must set the startDailyAt() before calling this endingDailyAfterCount()!");
    
    Date today = new Date();
    Date startTimeOfDayDate = startTimeOfDay.getTimeOfDayForDate(today);
    Date maxEndTimeOfDayDate = TimeOfDay.hourMinuteAndSecondOfDay(23, 59, 59).getTimeOfDayForDate(today);
    long remainingMillisInDay = maxEndTimeOfDayDate.getTime() - startTimeOfDayDate.getTime();
    long intervalInMillis;
    if (intervalUnit == IntervalUnit.SECOND)
        intervalInMillis = interval * 1000L;
    else if (intervalUnit == IntervalUnit.MINUTE)
            intervalInMillis = interval * 1000L * 60;
    else if (intervalUnit == IntervalUnit.HOUR)
        intervalInMillis = interval * 1000L * 60 * 24;
    else
        throw new IllegalArgumentException("The IntervalUnit: " + intervalUnit + " is invalid for this trigger."); 
    
    if (remainingMillisInDay - intervalInMillis <= 0)
        throw new IllegalArgumentException("The startTimeOfDay is too late with given Interval and IntervalUnit values.");
    
    long maxNumOfCount = (remainingMillisInDay / intervalInMillis);
    if (count > maxNumOfCount)
        throw new IllegalArgumentException("The given count " + count + " is too large! The max you can set is " + maxNumOfCount);
    
    long incrementInMillis = (count - 1) * intervalInMillis;
    Date endTimeOfDayDate = new Date(startTimeOfDayDate.getTime() + incrementInMillis);
    
    if (endTimeOfDayDate.getTime() > maxEndTimeOfDayDate.getTime())
        throw new IllegalArgumentException("The given count " + count + " is too large! The max you can set is " + maxNumOfCount);
    
    Calendar cal = Calendar.getInstance();
    cal.setTime(endTimeOfDayDate);
    int hour = cal.get(Calendar.HOUR_OF_DAY);
    int minute = cal.get(Calendar.MINUTE);
    int second = cal.get(Calendar.SECOND);
    
    endTimeOfDay = TimeOfDay.hourMinuteAndSecondOfDay(hour, minute, second);
    return this;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:50,代码来源:DailyTimeIntervalScheduleBuilder.java


示例11: createUpdateWeatherDataScheduler

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
private Scheduler createUpdateWeatherDataScheduler(int interval,
		TimeUnit unit, ResourceBinder resourceBinder, int startDelay)
		throws SchedulerException, IOException, URISyntaxException {

	StdSchedulerFactory schedulerFactory = new StdSchedulerFactory();
	Properties properties = new Properties();
	properties.setProperty("org.quartz.threadPool.threadCount",
			String.valueOf(1));
	schedulerFactory.initialize(properties);

	Scheduler scheduler = schedulerFactory.getScheduler();

	JobDetail job = JobBuilder.newJob(UpdateWeatherData.class).build();

	job.getJobDataMap().put("baseDir", ResourceBinder
			.getDataDir(this.getClass()).toFile().getCanonicalPath());
	job.getJobDataMap().put("resourceBinder", resourceBinder);

	int secs = 60;
	switch (unit) {
	case HOUR:
		secs = interval * 60 * 60;
		break;
	case MINUTE:
		secs = interval * 60;
	case SECOND:
		secs = interval;
		break;
	default:
		break;
	}

	ScheduleBuilder<SimpleTrigger> scheduleBuilder = SimpleScheduleBuilder
			.simpleSchedule().withIntervalInSeconds(secs).repeatForever();

	TriggerBuilder<Trigger> triggerBuilder = TriggerBuilder.newTrigger()
			.withIdentity("trigger1", "group1");

	if (startDelay < 1)
		triggerBuilder.startNow();
	else
		triggerBuilder.startAt(
				DateBuilder.futureDate(startDelay, IntervalUnit.SECOND));

	Trigger trigger = triggerBuilder.withSchedule(scheduleBuilder).build();

	scheduler.scheduleJob(job, trigger);

	return scheduler;

}
 
开发者ID:biggis-project,项目名称:path-optimizer,代码行数:52,代码来源:WebApi.java


示例12: DailyTimeIntervalTriggerImpl

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
/**
 * <p>
 * Create a <code>DailyTimeIntervalTrigger</code> that will occur at the given time,
 * and repeat at the the given interval until the given end time.
 * </p>
 * 
 * @param startTime
 *          A <code>Date</code> set to the time for the <code>Trigger</code>
 *          to fire.
 * @param endTime
 *          A <code>Date</code> set to the time for the <code>Trigger</code>
 *          to quit repeat firing.
 * @param startTimeOfDay 
 *          The <code>TimeOfDay</code> that the repeating should begin occurring.          
 * @param endTimeOfDay 
 *          The <code>TimeOfDay</code> that the repeating should stop occurring.          
 * @param intervalUnit The repeat interval unit. The only intervals that are valid for this type of trigger are 
 * {@link IntervalUnit#SECOND}, {@link IntervalUnit#MINUTE}, and {@link IntervalUnit#HOUR}.
 * @param repeatInterval
 *          The number of milliseconds to pause between the repeat firing.
 * @throws IllegalArgumentException if an invalid IntervalUnit is given, or the repeat interval is zero or less.
 */
public DailyTimeIntervalTriggerImpl(String name, String group, Date startTime,
        Date endTime, TimeOfDay startTimeOfDay, TimeOfDay endTimeOfDay, 
        IntervalUnit intervalUnit,  int repeatInterval) {
    super(name, group);

    setStartTime(startTime);
    setEndTime(endTime);
    setRepeatIntervalUnit(intervalUnit);
    setRepeatInterval(repeatInterval);
    setStartTimeOfDay(startTimeOfDay);
    setEndTimeOfDay(endTimeOfDay);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:35,代码来源:DailyTimeIntervalTriggerImpl.java


示例13: CalendarIntervalTriggerImpl

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
/**
 * <p>
 * Create a <code>DateIntervalTrigger</code> that will occur at the given time,
 * and repeat at the the given interval until the given end time.
 * </p>
 * 
 * @param startTime
 *          A <code>Date</code> set to the time for the <code>Trigger</code>
 *          to fire.
 * @param endTime
 *          A <code>Date</code> set to the time for the <code>Trigger</code>
 *          to quit repeat firing.
 * @param intervalUnit
 *          The repeat interval unit (minutes, days, months, etc).
 * @param repeatInterval
 *          The number of milliseconds to pause between the repeat firing.
 */
public CalendarIntervalTriggerImpl(String name, String group, Date startTime,
        Date endTime, IntervalUnit intervalUnit,  int repeatInterval) {
    super(name, group);

    setStartTime(startTime);
    setEndTime(endTime);
    setRepeatIntervalUnit(intervalUnit);
    setRepeatInterval(repeatInterval);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:27,代码来源:CalendarIntervalTriggerImpl.java


示例14: withInterval

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
/**
 * Specify the time unit and interval for the Trigger to be produced.
 * 
 * @param timeInterval the interval at which the trigger should repeat.
 * @param unit the time unit (IntervalUnit) of the interval. The only intervals that are valid for this type of 
 * trigger are {@link IntervalUnit#SECOND}, {@link IntervalUnit#MINUTE}, and {@link IntervalUnit#HOUR}.
 * @return the updated DailyTimeIntervalScheduleBuilder
 * @see DailyTimeIntervalTrigger#getRepeatInterval()
 * @see DailyTimeIntervalTrigger#getRepeatIntervalUnit()
 */
public DailyTimeIntervalScheduleBuilder withInterval(int timeInterval, IntervalUnit unit) {
    if (unit == null || !(unit.equals(IntervalUnit.SECOND) || 
            unit.equals(IntervalUnit.MINUTE) ||unit.equals(IntervalUnit.HOUR)))
        throw new IllegalArgumentException("Invalid repeat IntervalUnit (must be SECOND, MINUTE or HOUR).");
    validateInterval(timeInterval);
    this.interval = timeInterval;
    this.intervalUnit = unit;
    return this;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:20,代码来源:DailyTimeIntervalScheduleBuilder.java


示例15: withInterval

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
/**
 * Specify the time unit and interval for the Trigger to be produced.
 * 
 * @param timeInterval the interval at which the trigger should repeat.
 * @param unit  the time unit (IntervalUnit) of the interval.
 * @return the updated CalendarIntervalScheduleBuilder
 * @see CalendarIntervalTrigger#getRepeatInterval()
 * @see CalendarIntervalTrigger#getRepeatIntervalUnit()
 */
public CalendarIntervalScheduleBuilder withInterval(int timeInterval, IntervalUnit unit) {
    if(unit == null)
        throw new IllegalArgumentException("TimeUnit must be specified.");
    validateInterval(timeInterval);
    this.interval = timeInterval;
    this.intervalUnit = unit;
    return this;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:18,代码来源:CalendarIntervalScheduleBuilder.java


示例16: withIntervalInSeconds

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
/**
 * Specify an interval in the IntervalUnit.SECOND that the produced 
 * Trigger will repeat at.
 * 
 * @param intervalInSeconds the number of seconds at which the trigger should repeat.
 * @return the updated CalendarIntervalScheduleBuilder
 * @see CalendarIntervalTrigger#getRepeatInterval()
 * @see CalendarIntervalTrigger#getRepeatIntervalUnit()
 */
public CalendarIntervalScheduleBuilder withIntervalInSeconds(int intervalInSeconds) {
    validateInterval(intervalInSeconds);
    this.interval = intervalInSeconds;
    this.intervalUnit = IntervalUnit.SECOND;
    return this;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:CalendarIntervalScheduleBuilder.java


示例17: withIntervalInMinutes

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
/**
 * Specify an interval in the IntervalUnit.MINUTE that the produced 
 * Trigger will repeat at.
 * 
 * @param intervalInMinutes the number of minutes at which the trigger should repeat.
 * @return the updated CalendarIntervalScheduleBuilder
 * @see CalendarIntervalTrigger#getRepeatInterval()
 * @see CalendarIntervalTrigger#getRepeatIntervalUnit()
 */
public CalendarIntervalScheduleBuilder withIntervalInMinutes(int intervalInMinutes) {
    validateInterval(intervalInMinutes);
    this.interval = intervalInMinutes;
    this.intervalUnit = IntervalUnit.MINUTE;
    return this;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:CalendarIntervalScheduleBuilder.java


示例18: withIntervalInHours

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
/**
 * Specify an interval in the IntervalUnit.HOUR that the produced 
 * Trigger will repeat at.
 * 
 * @param intervalInHours the number of hours at which the trigger should repeat.
 * @return the updated CalendarIntervalScheduleBuilder
 * @see CalendarIntervalTrigger#getRepeatInterval()
 * @see CalendarIntervalTrigger#getRepeatIntervalUnit()
 */
public CalendarIntervalScheduleBuilder withIntervalInHours(int intervalInHours) {
    validateInterval(intervalInHours);
    this.interval = intervalInHours;
    this.intervalUnit = IntervalUnit.HOUR;
    return this;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:CalendarIntervalScheduleBuilder.java


示例19: withIntervalInDays

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
/**
 * Specify an interval in the IntervalUnit.DAY that the produced 
 * Trigger will repeat at.
 * 
 * @param intervalInDays the number of days at which the trigger should repeat.
 * @return the updated CalendarIntervalScheduleBuilder
 * @see CalendarIntervalTrigger#getRepeatInterval()
 * @see CalendarIntervalTrigger#getRepeatIntervalUnit()
 */
public CalendarIntervalScheduleBuilder withIntervalInDays(int intervalInDays) {
    validateInterval(intervalInDays);
    this.interval = intervalInDays;
    this.intervalUnit = IntervalUnit.DAY;
    return this;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:CalendarIntervalScheduleBuilder.java


示例20: withIntervalInWeeks

import org.quartz.DateBuilder.IntervalUnit; //导入依赖的package包/类
/**
 * Specify an interval in the IntervalUnit.WEEK that the produced 
 * Trigger will repeat at.
 * 
 * @param intervalInWeeks the number of weeks at which the trigger should repeat.
 * @return the updated CalendarIntervalScheduleBuilder
 * @see CalendarIntervalTrigger#getRepeatInterval()
 * @see CalendarIntervalTrigger#getRepeatIntervalUnit()
 */
public CalendarIntervalScheduleBuilder withIntervalInWeeks(int intervalInWeeks) {
    validateInterval(intervalInWeeks);
    this.interval = intervalInWeeks;
    this.intervalUnit = IntervalUnit.WEEK;
    return this;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:CalendarIntervalScheduleBuilder.java



注:本文中的org.quartz.DateBuilder.IntervalUnit类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java VolumeMountBuilder类代码示例发布时间:2022-05-23
下一篇:
Java EncodingAlgorithm类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap