Value object used to carry information about the status of a job or step execution. ExitStatus is immutable and therefore thread-safe.
More...
|
| ExitStatus (string exitCode, string exitDescription="") |
| Custom constructor using a code and a description. More...
|
|
ExitStatus | And (ExitStatus status) |
| Creates a new ExistStatus with a logical combination of the exit code, and a concatenation of the descriptions. If either value has a higher severity then its exit code will be used in the result. In the case of equal severity, the exit code is replaced if the new value is alphabetically greater. More...
|
|
int | CompareTo (ExitStatus status) |
| see IComparable More...
|
|
override string | ToString () |
| ToString override More...
|
|
override bool | Equals (object obj) |
| Compare the fields one by one. Equals override. More...
|
|
override int | GetHashCode () |
| Compatible with the Equals implementation. GetHashCode override. More...
|
|
ExitStatus | ReplaceExitCode (string code) |
| Adds an exit code to an existing ExistStatus. If there is already a code present, it will be replaced. More...
|
|
bool | IsRunning () |
| Check if this status represents a running process. More...
|
|
ExitStatus | AddExitDescription (string description) |
| Add an exit description to an existing ExistStatus. If there is already a description present the two will be concatenated with a semicolon. More...
|
|
ExitStatus | AddExitDescription (Exception exception) |
| Extract the stack trace from the throwable provided and append it to the exist description. More...
|
|
|
static readonly ExitStatus | Unknown = new ExitStatus("UNKNOWN") |
| Convenient constant value representing unknown state - assumed not continuable. More...
|
|
static readonly ExitStatus | Executing = new ExitStatus("EXECUTING") |
| Convenient constant value representing continuable state where processing is still taking place, so no further action is required. Used for asynchronous execution scenarios where the processing is happening in another thread or process and the caller is not required to wait for the result. More...
|
|
static readonly ExitStatus | Completed = new ExitStatus("COMPLETED") |
| Convenient constant value representing finished processing. More...
|
|
static readonly ExitStatus | Noop = new ExitStatus("NOOP") |
| Convenient constant value representing job that did no processing (e.g. because it was already complete). More...
|
|
static readonly ExitStatus | Failed = new ExitStatus("FAILED") |
| Convenient constant value representing finished processing with an error. More...
|
|
static readonly ExitStatus | Stopped = new ExitStatus("STOPPED") |
| Convenient constant value representing finished processing with interrupted status. More...
|
|
Value object used to carry information about the status of a job or step execution. ExitStatus is immutable and therefore thread-safe.
Summer.Batch.Core.ExitStatus.ExitStatus |
( |
string |
exitCode, |
|
|
string |
exitDescription = "" |
|
) |
| |
Custom constructor using a code and a description.
- Parameters
-
ExitStatus Summer.Batch.Core.ExitStatus.AddExitDescription |
( |
string |
description | ) |
|
Add an exit description to an existing ExistStatus. If there is already a description present the two will be concatenated with a semicolon.
- Parameters
-
description | the description to add |
- Returns
- a new ExitStatus with the same properties but a new exit description
ExitStatus Summer.Batch.Core.ExitStatus.AddExitDescription |
( |
Exception |
exception | ) |
|
Extract the stack trace from the throwable provided and append it to the exist description.
- Parameters
-
exception | the given exception |
- Returns
- a new ExitStatus with the stack trace appended
Creates a new ExistStatus with a logical combination of the exit code, and a concatenation of the descriptions. If either value has a higher severity then its exit code will be used in the result. In the case of equal severity, the exit code is replaced if the new value is alphabetically greater.
Severity is defined by the exit code:
-
Codes beginning with EXECUTING have severity 1
-
Codes beginning with COMPLETED have severity 2
-
Codes beginning with NOOP have severity 3
-
Codes beginning with STOPPED have severity 4
-
Codes beginning with FAILED have severity 5
-
Codes beginning with UNKNOWN have severity 6
Others have severity 7, so custom exit codes always win. If the input is null just return this.
- Parameters
-
- Returns
- a new ExitStatus combining the current value and the argument provided.
int Summer.Batch.Core.ExitStatus.CompareTo |
( |
ExitStatus |
status | ) |
|
see IComparable
- Parameters
-
- Returns
- greater than zero, 0, less than zero according to the severity and exit code
override bool Summer.Batch.Core.ExitStatus.Equals |
( |
object |
obj | ) |
|
Compare the fields one by one. Equals override.
- Parameters
-
- Returns
override int Summer.Batch.Core.ExitStatus.GetHashCode |
( |
| ) |
|
Compatible with the Equals implementation. GetHashCode override.
- Returns
static bool Summer.Batch.Core.ExitStatus.IsNonDefaultExitStatus |
( |
ExitStatus |
status | ) |
|
|
static |
Checks whether the given ExitStatus is a known exit code.
- Parameters
-
status | the exit code to be evaluated |
- Returns
- true if the value matches a known exit code
bool Summer.Batch.Core.ExitStatus.IsRunning |
( |
| ) |
|
Check if this status represents a running process.
- Returns
true
if the exit code is "EXECUTING" or "UNKNOWN"
ExitStatus Summer.Batch.Core.ExitStatus.ReplaceExitCode |
( |
string |
code | ) |
|
Adds an exit code to an existing ExistStatus. If there is already a code present, it will be replaced.
- Parameters
-
- Returns
- a new ExistStatus with the same properties but a new exit code
override string Summer.Batch.Core.ExitStatus.ToString |
( |
| ) |
|
ToString override
- Returns
Convenient constant value representing finished processing.
Convenient constant value representing continuable state where processing is still taking place, so no further action is required. Used for asynchronous execution scenarios where the processing is happening in another thread or process and the caller is not required to wait for the result.
Convenient constant value representing finished processing with an error.
Convenient constant value representing job that did no processing (e.g. because it was already complete).
Convenient constant value representing finished processing with interrupted status.
Convenient constant value representing unknown state - assumed not continuable.
string Summer.Batch.Core.ExitStatus.ExitCode |
|
get |
string Summer.Batch.Core.ExitStatus.ExitDescription |
|
get |
The documentation for this class was generated from the following file:
- Summer.Batch.Core/Core/ExitStatus.cs