Statuses of a batch execution. More...

Public Member Functions

bool IsRunning ()
 Convenience method to decide if a status indicates work is in progress. More...
 
bool IsUnsuccessful ()
 
BatchStatus UpgradeTo (BatchStatus other)
 Method used to move status values through their logical progression, and override less severe failures with more severe ones. This value is compared with the parameter and the one that has higher priority is returned. If both are STARTED or less than the value returned is the largest in the sequence STARTING, STARTED, COMPLETED. Otherwise the value returned is the maximum of the two. More...
 
bool IsGreaterThan (BatchStatus other)
 
bool IsLessThan (BatchStatus other)
 
bool IsLessThanOrEqualTo (BatchStatus other)
 
override bool Equals (object other)
 Equals override. More...
 
override int GetHashCode ()
 GetHashCode override. More...
 
override string ToString ()
 ToString override. More...
 

Static Public Member Functions

static bool operator== (BatchStatus status1, BatchStatus status2)
 Redefining equality operator. More...
 
static bool operator!= (BatchStatus status1, BatchStatus status2)
 Redefining non equality operator. More...
 
static BatchStatus ValueOf (string status)
 given string, returns corresponding status (if it makes sense) More...
 
static BatchStatus Max (BatchStatus status1, BatchStatus status2)
 return max BatchStatus from 2 More...
 
static BatchStatus Match (string value)
 Find a BatchStatus that matches the beginning of the given value. If no match is found, return COMPLETED as the default because has is low precedence. More...
 

Static Public Attributes

static readonly BatchStatus Completed = new BatchStatus(0, "COMPLETED")
 Completed status More...
 
static readonly BatchStatus Starting = new BatchStatus(1, "STARTING")
 Starting status More...
 
static readonly BatchStatus Started = new BatchStatus(2, "STARTED")
 Started status More...
 
static readonly BatchStatus Stopping = new BatchStatus(3, "STOPPING")
 Stopping status More...
 
static readonly BatchStatus Stopped = new BatchStatus(4, "STOPPED")
 Stopped status. More...
 
static readonly BatchStatus Failed = new BatchStatus(5, "FAILED")
 Failed status. More...
 
static readonly BatchStatus Abandoned = new BatchStatus(6, "ABANDONED")
 Abandoned status. More...
 
static readonly BatchStatus Unknown = new BatchStatus(7, "UNKNOWN")
 Unkonwn status. More...
 
static readonly BatchStatus[] Values = { Completed, Starting, Started, Stopping, Stopped, Failed, Abandoned, Unknown }
 Possible status values. More...
 

Detailed Description

Statuses of a batch execution.

Member Function Documentation

override bool Summer.Batch.Core.BatchStatus.Equals ( object  other)

Equals override.

Parameters
other
Returns
override int Summer.Batch.Core.BatchStatus.GetHashCode ( )

GetHashCode override.

Returns
bool Summer.Batch.Core.BatchStatus.IsGreaterThan ( BatchStatus  other)

Parameters
otherother value to compare
Returns
true if this is greater than other
bool Summer.Batch.Core.BatchStatus.IsLessThan ( BatchStatus  other)

Parameters
otherother a status value to compare
Returns
true if this is less than other
bool Summer.Batch.Core.BatchStatus.IsLessThanOrEqualTo ( BatchStatus  other)

Parameters
otherother a status value to compare
Returns
true if this is less or equal than other
bool Summer.Batch.Core.BatchStatus.IsRunning ( )

Convenience method to decide if a status indicates work is in progress.

Returns
true if the status is STARTING, STARTED
bool Summer.Batch.Core.BatchStatus.IsUnsuccessful ( )

Convenience method to decide if a status indicates execution was unsuccessful.

Returns
true if the status is FAILED or greater
static BatchStatus Summer.Batch.Core.BatchStatus.Match ( string  value)
static

Find a BatchStatus that matches the beginning of the given value. If no match is found, return COMPLETED as the default because has is low precedence.

Parameters
value
Returns
static BatchStatus Summer.Batch.Core.BatchStatus.Max ( BatchStatus  status1,
BatchStatus  status2 
)
static

return max BatchStatus from 2

Parameters
status1
status2
Returns
static bool Summer.Batch.Core.BatchStatus.operator!= ( BatchStatus  status1,
BatchStatus  status2 
)
static

Redefining non equality operator.

Parameters
status1
status2
Returns
static bool Summer.Batch.Core.BatchStatus.operator== ( BatchStatus  status1,
BatchStatus  status2 
)
static

Redefining equality operator.

Parameters
status1
status2
Returns
override string Summer.Batch.Core.BatchStatus.ToString ( )

ToString override.

Returns
BatchStatus Summer.Batch.Core.BatchStatus.UpgradeTo ( BatchStatus  other)

Method used to move status values through their logical progression, and override less severe failures with more severe ones. This value is compared with the parameter and the one that has higher priority is returned. If both are STARTED or less than the value returned is the largest in the sequence STARTING, STARTED, COMPLETED. Otherwise the value returned is the maximum of the two.

Parameters
otherother another status to compare to
Returns
either this or the other status depending on their priority
static BatchStatus Summer.Batch.Core.BatchStatus.ValueOf ( string  status)
static

given string, returns corresponding status (if it makes sense)

Parameters
status
Returns

Member Data Documentation

readonly BatchStatus Summer.Batch.Core.BatchStatus.Abandoned = new BatchStatus(6, "ABANDONED")
static

Abandoned status.

readonly BatchStatus Summer.Batch.Core.BatchStatus.Completed = new BatchStatus(0, "COMPLETED")
static

Completed status

readonly BatchStatus Summer.Batch.Core.BatchStatus.Failed = new BatchStatus(5, "FAILED")
static

Failed status.

readonly BatchStatus Summer.Batch.Core.BatchStatus.Started = new BatchStatus(2, "STARTED")
static

Started status

readonly BatchStatus Summer.Batch.Core.BatchStatus.Starting = new BatchStatus(1, "STARTING")
static

Starting status

readonly BatchStatus Summer.Batch.Core.BatchStatus.Stopped = new BatchStatus(4, "STOPPED")
static

Stopped status.

readonly BatchStatus Summer.Batch.Core.BatchStatus.Stopping = new BatchStatus(3, "STOPPING")
static

Stopping status

readonly BatchStatus Summer.Batch.Core.BatchStatus.Unknown = new BatchStatus(7, "UNKNOWN")
static

Unkonwn status.

readonly BatchStatus [] Summer.Batch.Core.BatchStatus.Values = { Completed, Starting, Started, Stopping, Stopped, Failed, Abandoned, Unknown }
static

Possible status values.


The documentation for this class was generated from the following file:
  • Summer.Batch.Core/Core/BatchStatus.cs