org.oddjob.state
Class Resets
java.lang.Object
org.oddjob.framework.BaseComponent
org.oddjob.framework.BasePrimary
org.oddjob.framework.StructuralJob<Object>
org.oddjob.state.Resets
- All Implemented Interfaces:
- Serializable, Runnable, ArooaContextAware, ArooaSessionAware, Forceable, PropertyChangeNotifier, Iconic, LogEnabled, Resetable, Stateful, Stoppable, Structural
public class Resets
- extends StructuralJob<Object>
Description
Captures Reset actions propagating down a job tree and either hardens
soft resets to hard resets or softens hard resets to soft resets before
passing them on to the child job.
Execute and Stop actions are cascaded as normal to the child job.
See also the ResetJob
job.
Example
Examples elsewhere.
- See the
EqualsState
example. The resets are
required because retry only sends a soft reset on retry
and it must be hardened to reset the ExistsJob
.
- See Also:
- Serialized Form
- Author:
- Rob Gordon
Methods inherited from class org.oddjob.framework.StructuralJob |
addStructuralListener, fireDestroyedState, force, getStateChanger, isStop, onDestroy, onReset, onStop, removeStructuralListener, run, startChildStateReflector, stateHandler, stop |
Methods inherited from class org.oddjob.framework.BaseComponent |
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, setArooaContext, setArooaSession |
Resets
public Resets()
getInitialStateOp
protected StateOperator getInitialStateOp()
- Description copied from class:
StructuralJob
- Subclasses must provide the
StateOperator
that will decide
how to evaluate the children's state.
- Specified by:
getInitialStateOp
in class StructuralJob<Object>
- Returns:
- A State Operator. Must not be null.
execute
protected void execute()
throws Throwable
- Description copied from class:
StructuralJob
- Execute this job.
- Specified by:
execute
in class StructuralJob<Object>
- Throws:
Exception
- If the unexpected occurs.
Throwable
isHarden
public boolean isHarden()
setHarden
public void setHarden(boolean harden)
isSoften
public boolean isSoften()
setSoften
public void setSoften(boolean soften)
setJob
public void setJob(Object job)
Property: job
Description: The job to pass resets on to.
Required: Yes.
hardReset
public boolean hardReset()
- Description copied from class:
StructuralJob
- Perform a hard reset on the job.
- Specified by:
hardReset
in interface Resetable
- Overrides:
hardReset
in class StructuralJob<Object>
- Returns:
- true if successful.
softReset
public boolean softReset()
- Description copied from class:
StructuralJob
- Perform a soft reset on the job.
- Specified by:
softReset
in interface Resetable
- Overrides:
softReset
in class StructuralJob<Object>
- Returns:
- true if successful.