Class Resets

All Implemented Interfaces:
Serializable, Runnable, ArooaContextAware, ArooaSessionAware, Forceable, PropertyChangeNotifier, Iconic, LogEnabled, Resettable, Stateful, Stoppable, Structural

public class Resets extends StructuralJob<Object>
Author:
Rob Gordon
See Also:

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.
  • Constructor Details

    • Resets

      public Resets()
  • Method Details

    • 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:
      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)
      Reference 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 Resettable
      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 Resettable
      Overrides:
      softReset in class StructuralJob<Object>
      Returns:
      true if successful.