public class Retry extends TimerBase
<oddjob id="this">
<job>
<scheduling:retry name="File Polling Example" xmlns:scheduling="http://rgordon.co.uk/oddjob/scheduling" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules">
<schedule>
<schedules:interval interval="00:00:05"/>
</schedule>
<job>
<sequential id="look" name="Look for files">
<jobs>
<exists file="${this.dir}/work/*.foo" id="check" name="Check File Exists"/>
<echo name="Echo to Console">Found ${check.exists[0]}</echo>
</jobs>
</sequential>
</job>
</scheduling:retry>
</job>
</oddjob>
<oddjob xmlns:schedules="http://rgordon.co.uk/oddjob/schedules" xmlns:scheduling="http://rgordon.co.uk/oddjob/scheduling" xmlns:state="http://rgordon.co.uk/oddjob/state">
<job>
<scheduling:timer id="timer">
<schedule>
<schedules:daily from="08:00"/>
</schedule>
<job>
<scheduling:retry id="retry">
<schedule>
<schedules:count count="2"/>
</schedule>
<job>
<state:flag id="flag-job" state="EXCEPTION"/>
</job>
</scheduling:retry>
</job>
</scheduling:timer>
</job>
</oddjob>
contextDatabegun, childHelper, childStateReflector, stateHandler, stop| Constructor and Description |
|---|
Retry() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
begin()
Sub classes must override this to submit the first execution.
|
protected StateCondition |
getDefaultHaltOn() |
protected ResetAction |
getDefaultReset() |
Interval |
getLimits()
Implementation provided by sub classes so limits are available in
TimerBase.scheduleFrom(Date). |
protected StateOperator |
getStateOp()
Sub classes provide the state operator that is used to calculate the subclasses
completion state.
|
protected boolean |
isSkipMissedRuns() |
void |
setLimits(Interval limits) |
CancelAndStopChild, changeStateLocked, getClock, getCurrent, getHaltOn, getLastDue, getNextDue, getReset, getSchedule, getTimeZone, handleChildState, internalSetNextDue, onReset, onStop, postStop, reschedule, reset, scheduleFrom, setClock, setHaltOn, setJob, setNextDue, setReschedule, setReset, setSchedule, setScheduleExecutorService, setTimeZoneaddStructuralListener, fireDestroyedState, force, getStateChanger, hardReset, iconHelper, onDestroy, removeStructuralListener, run, softReset, stateHandler, stopconfigure, getName, logger, logger, loggerName, save, setName, toStringaddIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, setArooaContext, setArooaSessionclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddStateListener, lastStateEvent, removeStateListenerprotected StateOperator getStateOp()
ScheduleBasegetStateOp in class ScheduleBaseprotected void begin()
throws ComponentPersistException
ScheduleBasebegin in class TimerBaseComponentPersistException - If the scheduled time can't be saved.public void setLimits(Interval limits)
public Interval getLimits()
TimerBaseTimerBase.scheduleFrom(Date).protected boolean isSkipMissedRuns()
isSkipMissedRuns in class TimerBaseprotected StateCondition getDefaultHaltOn()
getDefaultHaltOn in class TimerBaseprotected ResetAction getDefaultReset()
getDefaultReset in class TimerBase