Iterative Process
Properties
The iterative process may end by a variety of means, this checks if the iterative process ended because it ran all of its steps, true if all completed
Returns system time in nanoseconds that the iterative process started
Gets the clock time as a Duration since the iterative process was initialized
Returns system time in nanoseconds that the iterative process ended
Indicates the status of the iterative process
A flag to indicate whether the iterative process is done A iterative process can be done if: 1) it ran all of its steps 2) it was ended by a client prior to completing all of its steps 3) it ended because it exceeded its maximum allowable execution time before completing all of its steps. 4) its end condition was satisfied
Returns if the elapsed execution time exceeds the maximum time allowed. Only true if the maximum was set and elapsed time is greater than or equal to getMaximumAllowedExecutionTime()
Checks if the iterative process is in the initialized state After the iterative process has been initialized this method will return true
Indicates that the iterative process is currently running an individual step
Checks if the iterative process is in the completed step state After the iterative process has successfully completed a step this property will be true
The iterative process may end by a variety of means, this method checks if the iterative process ended but was unfinished, not all steps completed
The maximum allotted (suggested) execution (real) clock for the entire iterative process in nanoseconds. This is a suggested time because the execution time requirement is only checked after the completion of an individual step After it is discovered that cumulative time for executing the step has exceeded the maximum time, then the iterative process will be ended (perhaps) not completing other steps.
Indicates that the iterative process ended because of no steps
Returns the number of steps completed since the iterative process was last initialized
The iterative process may end by a variety of means, this method checks if the iterative process ended because it was stopped, true if it was stopped via stop()
A string message for why stop() was called.
Functions
Allows the adding (attaching) of an observer to the observable
Returns how many observers are currently attached to the observable
Detaches all the observers from the observable
Allows the deletion (removing) of an observer from the observable
The iterative process will continue until there are no more steps or its maximum execution time has been reached, whichever comes first. If this method is called the iterative process will stop processing (terminate) before the next step and not process the next step in the process. The current step will be completed. This method can be used to stop the process at an arbitrary step. Once stopped, the process must be restarted.
This method should check to see if another step is necessary for the iterative process. True means that the process has another step to be executed. False, means that no more steps are available for execution.
Initializes the iterative process prior to running any steps This must be done prior to calling runNext();
Returns true if the observer is already attached
This sets a flag to indicate to the process that is should stop after the next step is completed. This is different than end(). Calling end() immediately places the process in the End state. The process needs to be in a valid state before end() can be used. Calling stop tells the process to eventually get into the end state. stop() can be used to arbitrarily stop the process based on some user defined condition.