IterativeProcessIfc

Types

Properties

Link copied to clipboard
open override val allStepsCompleted: Boolean

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

Link copied to clipboard
open override val elapsedExecutionTime: Duration

Gets the clock time as a Duration since the iterative process was initialized

Link copied to clipboard
open override val isExecutionTimeExceeded: Boolean

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()

Link copied to clipboard
open override val isUnfinished: Boolean

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

Link copied to clipboard
open override val noStepsExecuted: Boolean

Indicates that the iterative process ended because of no steps

Link copied to clipboard
open override val stoppedByCondition: Boolean

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()

Functions

Link copied to clipboard
abstract fun end(msg: String? = null)

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.

Link copied to clipboard
abstract fun initialize()

Initializes the iterative process prior to running any steps This must be done prior to calling runNext();

Link copied to clipboard
abstract fun run()

Runs all the steps of the iterative process.

Link copied to clipboard
abstract fun runNext()

Runs the next step in the iterative process

Link copied to clipboard
abstract fun stop(msg: String? = null)

This sets a flag to indicate to the process that it should stop after the next step is completed. This is different from 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.