IterativeProcessIfc

Author

rossetti

Inheritors

Types

Properties

Link copied to clipboard

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
abstract val beginExecutionTime: Instant

Returns system time in nanoseconds that the iterative process started

Link copied to clipboard

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

Link copied to clipboard
abstract val endExecutionTime: Instant

Returns system time in nanoseconds that the iterative process ended

Link copied to clipboard

Indicates the status of the iterative process

Link copied to clipboard
abstract val isCreated: Boolean

Checks if the iterative process is in the created state. If the iterative process is in the created state this method will return true

Link copied to clipboard
abstract val isDone: Boolean

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

Link copied to clipboard
abstract val isEnded: Boolean

Checks if the iterative process is in the ended state. After the iterative process has been ended this property will return true

Link copied to clipboard

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
abstract val isInitialized: Boolean

Checks if the iterative process is in the initialized state After the iterative process has been initialized this method will return true

Link copied to clipboard
abstract val isRunning: Boolean

An iterative process is running if it has been told to run (i.e. runNext()) but has not yet been told to end().

Link copied to clipboard
abstract val isRunningStep: Boolean

Indicates that the iterative process is currently running an individual step

Link copied to clipboard
abstract val isStepCompleted: Boolean

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

Link copied to clipboard

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

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.

Link copied to clipboard

Indicates that the iterative process ended because of no steps

Link copied to clipboard

Returns the number of steps completed since the iterative process was last initialized

Link copied to clipboard

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

Link copied to clipboard
abstract val stopping: Boolean

Returns the stopping flag

Link copied to clipboard
abstract val stoppingMessage: String?

A string message for why stop() was called.

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 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.