@Override public Object clone() { CronTriggerImpl copy = (CronTriggerImpl) super.clone(); if (cronEx != null) { copy.setCronExpression(new CronExpression(cronEx)); } return copy; }
@Override public String toString() { return super.toString() + ", repeatCount: " + getRepeatCount() + ", repeatInterval: " + getRepeatInterval(); } }
public void setCronExpression(String cronExpression) throws ParseException { TimeZone origTz = getTimeZone(); this.cronEx = new CronExpression(cronExpression); this.cronEx.setTimeZone(origTz); }
/** * Build the actual Trigger -- NOT intended to be invoked by end users, but will rather be invoked * by a TriggerBuilder which this ScheduleBuilder is given to. */ @Override public OperableTrigger instantiate() { SimpleTriggerImpl st = new SimpleTriggerImpl(); st.setRepeatInterval(interval); st.setRepeatCount(repeatCount); st.setMisfireInstruction(misfireInstruction); return st; }
TriggerWrapper(OperableTrigger trigger) { this.trigger = trigger; key = trigger.getName(); this.jobKey = trigger.getJobName(); }
/** * <p> * Create a <code>ObjectAlreadyExistsException</code> and auto-generate a message using the name/group from the given <code>Trigger</code>. * </p> * <p> * The message will read: <BR> * "Unable to store Trigger with name: '__' and group: '__', because one already exists with this identification." * </p> */ public ObjectAlreadyExistsException(Trigger offendingTrigger) { super("Unable to store Trigger with name: '" + offendingTrigger.getName() + "', because one already exists with this identification."); }
/** * Returns the next date/time <I>after</I> the given date/time which satisfies the cron expression. * * @param date the date/time at which to begin the search for the next valid date/time * @return the next valid date/time */ public Date getNextValidTimeAfter(Date date) { return getTimeAfter(date); }
/** * <p> * Determines whether or not the <code>CronTrigger</code> will occur again. * </p> */ @Override public boolean mayFireAgain() { return (getNextFireTime() != null); }
/** * NOT YET IMPLEMENTED: Returns the time before the given time that this <code>CronTrigger</code> will fire. */ private Date getTimeBefore(Date endTime) { return (cronEx == null) ? null : cronEx.getTimeBefore(endTime); }
/** * Set the CronExpression to the given one. The TimeZone on the passed-in CronExpression over-rides any that was already set on the Trigger. * * @param cronExpression */ public void setCronExpression(CronExpression cronExpression) { this.cronEx = cronExpression; this.timeZone = cronExpression.getTimeZone(); }
/** * <p> * Determines whether or not the <code>SimpleTrigger</code> will occur again. * </p> */ @Override public boolean mayFireAgain() { return (getNextFireTime() != null); }
@Override public Object clone() { CronTriggerImpl copy = (CronTriggerImpl) super.clone(); if (cronEx != null) { copy.setCronExpression(new CronExpression(cronEx)); } return copy; }
@Override public String toString() { return super.toString() + ", repeatCount: " + getRepeatCount() + ", repeatInterval: " + getRepeatInterval(); } }
public void setCronExpression(String cronExpression) throws ParseException { TimeZone origTz = getTimeZone(); this.cronEx = new CronExpression(cronExpression); this.cronEx.setTimeZone(origTz); }
/** * Returns the next date/time <I>after</I> the given date/time which satisfies the cron * expression. * * @param date the date/time at which to begin the search for the next valid date/time * @return the next valid date/time */ public Date getNextValidTimeAfter(Date date) { return getTimeAfter(date); }
/** * <p> * Determines whether or not the <code>CronTrigger</code> will occur again. * </p> */ @Override public boolean mayFireAgain() { return (getNextFireTime() != null); }
@Override public Object clone() { CronTriggerImpl copy = (CronTriggerImpl) super.clone(); if (cronEx != null) { copy.setCronExpression(new CronExpression(cronEx)); } return copy; }
@Override public String toString() { return super.toString() + ", repeatCount: " + getRepeatCount() + ", repeatInterval: " + getRepeatInterval(); } }
public void setCronExpression(String cronExpression) throws ParseException { TimeZone origTz = getTimeZone(); this.cronEx = new CronExpression(cronExpression); this.cronEx.setTimeZone(origTz); }
/** * Returns the next date/time <I>after</I> the given date/time which satisfies the cron expression. * * @param date the date/time at which to begin the search for the next valid date/time * @return the next valid date/time */ public Date getNextValidTimeAfter(Date date) { return getTimeAfter(date); }