public abstract class CascadingStats
extends java.lang.Object
implements java.io.Serializable
pending
- when the Flow or Cascade has yet to start.skipped
- when the Flow was skipped by the parent Cascade.started
- when Flow.start()
was called.submitted
- when the Step was submitted to the underlying platform for work.running
- when the Flow or Cascade is executing a workload.stopped
- when the user calls Flow.stop()
on the Flow or Cascade.failed
- when the Flow or Cascade threw an error and failed to finish the workload.successful
- when the Flow or Cascade naturally completed its workload without failure.startTime
- when the start()
method was called.submitTime
- when the unit of work was actually submitted for execution. Not supported by all sub-classes.runTime
- when the unit of work actually began to execute work. This value may be affected by any "polling interval" in place.finishedTime
- when all work has completed successfully, failed, or stopped.finished
when the Flow or Cascade is no longer processing a workload and successful
,
failed
, or stopped
is true.CascadeStats
,
FlowStats
,
FlowStepStats
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
CascadingStats.Status |
Modifier and Type | Field and Description |
---|---|
protected ClientState |
clientState |
static java.lang.String |
STATS_STORE_INTERVAL |
Modifier | Constructor and Description |
---|---|
protected |
CascadingStats(java.lang.String name,
ClientState clientState) |
Modifier and Type | Method and Description |
---|---|
abstract void |
captureDetail()
Method captureDetail will recursively capture details about nested systems.
|
void |
cleanup()
Method cleanup destroys any resources allocated by this instance.
|
abstract java.util.Collection |
getChildren()
Method getChildren returns any relevant child statistics instances.
|
abstract java.util.Collection<java.lang.String> |
getCounterGroups()
Method getCounterGroups returns all the available counter group names.
|
abstract java.util.Collection<java.lang.String> |
getCounterGroupsMatching(java.lang.String regex)
Method getCounterGroupsMatching returns all the available counter group names that match
the given regular expression.
|
java.util.Collection<java.lang.String> |
getCountersFor(java.lang.Class<? extends java.lang.Enum> group)
Method getCountersFor returns all the counter names for the counter Enum.
|
abstract java.util.Collection<java.lang.String> |
getCountersFor(java.lang.String group)
Method getCountersFor returns all the counter names for the give group name.
|
abstract long |
getCounterValue(java.lang.Enum counter)
Method getCounter returns the current value for the given counter Enum.
|
abstract long |
getCounterValue(java.lang.String group,
java.lang.String counter)
Method getCounter returns the current value for the given group and counter.
|
long |
getCurrentDuration()
Method getCurrentDuration returns the current duration of the current work whether or not
the work is finished.
|
long |
getDuration()
Method getDuration returns the duration the work executed before being finished.
|
long |
getFinishedTime()
Method getFinishedTime returns the finishedTime of this CascadingStats object.
|
abstract java.lang.String |
getID()
Method getID returns the ID of this CascadingStats object.
|
java.lang.String |
getName()
Method getName returns the name of this CascadingStats object.
|
long |
getPendingTime()
Method getPendingTime returns the pendingTime of this CascadingStats object.
|
long |
getRunTime()
Method getRunTime returns the runTime of this CascadingStats object.
|
long |
getStartTime()
Method getStartTime returns the startTime of this CascadingStats object.
|
protected java.lang.String |
getStatsString() |
CascadingStats.Status |
getStatus()
Method getStatus returns the
CascadingStats.Status of this CascadingStats object. |
long |
getSubmitTime()
Method getSubmitTime returns the submitTime of this CascadingStats object.
|
java.lang.Throwable |
getThrowable()
Method getThrowable returns the throwable of this CascadingStats object.
|
boolean |
isEngaged()
Method isEngaged returns true when there is work being executed, if
isStarted() , isSubmitted() , or isRunning() returns true; |
boolean |
isFailed()
Method isFailed returns true when the work ended with an error.
|
boolean |
isFinished()
Method isFinished returns true if the current status shows no work currently being executed,
if
isSkipped() , isSuccessful() , isFailed() , or isStopped() returns true. |
boolean |
isPending()
Method isPending returns true if no work has been submitted.
|
boolean |
isRunning()
Method isRunning returns true when work has begun.
|
boolean |
isSkipped()
Method isSkipped returns true when the works was skipped.
|
boolean |
isStarted()
Method isStarted returns true when work has started.
|
boolean |
isStopped()
Method isStopped returns true when the user stopped the work.
|
boolean |
isSubmitted()
Method isSubmitted returns true if no work has started.
|
boolean |
isSuccessful()
Method isSuccessful returns true when work has completed successfully.
|
void |
markFailed(java.lang.Throwable throwable)
Method markFailed sets the status to
CascadingStats.Status.FAILED . |
void |
markPending()
Method markPending sets the status to
CascadingStats.Status.PENDING . |
protected void |
markPendingTime() |
void |
markRunning()
Method markRunning sets the status to
CascadingStats.Status.RUNNING . |
protected void |
markRunTime() |
void |
markSkipped()
Method markSkipped sets the status to
CascadingStats.Status.SKIPPED . |
void |
markStarted()
Method markStarted sets the status to
CascadingStats.Status.STARTED . |
void |
markStartedThenRunning()
Method markStartedThenRunning consecutively marks the status as
CascadingStats.Status.STARTED then CascadingStats.Status.RUNNING
and forces the start and running time to be equals. |
protected void |
markStartTime() |
protected void |
markStartToRunTime() |
void |
markStopped()
Method markStopped sets the status to
CascadingStats.Status.STOPPED . |
void |
markSubmitted()
Method markSubmitted sets the status to
CascadingStats.Status.SUBMITTED . |
protected void |
markSubmitTime() |
void |
markSuccessful()
Method markSuccessful sets the status to
CascadingStats.Status.SUCCESSFUL . |
void |
prepare()
Method prepare initializes this instance.
|
abstract void |
recordInfo() |
void |
recordStats()
Method recordStats forces recording of current status information.
|
static void |
setStatsStoreInterval(java.util.Map<java.lang.Object,java.lang.Object> properties,
long intervalMs)
Method setStatsStoreInterval sets the interval time between store operations against the underlying
document storage services.
|
java.lang.String |
toString() |
public static final java.lang.String STATS_STORE_INTERVAL
protected final ClientState clientState
protected CascadingStats(java.lang.String name, ClientState clientState)
public static void setStatsStoreInterval(java.util.Map<java.lang.Object,java.lang.Object> properties, long intervalMs)
properties
- of type PropertiesintervalMs
- milliseconds between storage callspublic void prepare()
public void cleanup()
public abstract java.lang.String getID()
public java.lang.String getName()
public java.lang.Throwable getThrowable()
public boolean isPending()
public boolean isSkipped()
FlowSkipStrategy.skipFlow(Flow)
returns true
;public boolean isStarted()
public boolean isSubmitted()
public boolean isRunning()
public boolean isEngaged()
isStarted()
, isSubmitted()
, or isRunning()
returns true;public boolean isSuccessful()
public boolean isFailed()
public boolean isStopped()
public boolean isFinished()
isSkipped()
, isSuccessful()
, isFailed()
, or isStopped()
returns true.public CascadingStats.Status getStatus()
CascadingStats.Status
of this CascadingStats object.public void recordStats()
public abstract void recordInfo()
public void markPending()
CascadingStats.Status.PENDING
.protected void markPendingTime()
public void markStartedThenRunning()
CascadingStats.Status.STARTED
then CascadingStats.Status.RUNNING
and forces the start and running time to be equals.protected void markStartToRunTime()
public void markStarted()
CascadingStats.Status.STARTED
.protected void markStartTime()
public void markSubmitted()
CascadingStats.Status.SUBMITTED
.protected void markSubmitTime()
public void markRunning()
CascadingStats.Status.RUNNING
.protected void markRunTime()
public void markSuccessful()
CascadingStats.Status.SUCCESSFUL
.public void markFailed(java.lang.Throwable throwable)
CascadingStats.Status.FAILED
.throwable
- of type Throwablepublic void markStopped()
CascadingStats.Status.STOPPED
.public void markSkipped()
CascadingStats.Status.SKIPPED
.public long getPendingTime()
public long getStartTime()
public long getSubmitTime()
public long getRunTime()
public long getFinishedTime()
public long getDuration()
getCurrentDuration()
if you wish to poll for the current duration value.
Duration is calculated as finishedTime - startTime
.public long getCurrentDuration()
getDuration()
.
Duration is calculated as finishedTime - startTime
.public abstract java.util.Collection<java.lang.String> getCounterGroups()
public abstract java.util.Collection<java.lang.String> getCounterGroupsMatching(java.lang.String regex)
regex
- of type Stringpublic abstract java.util.Collection<java.lang.String> getCountersFor(java.lang.String group)
group
- public java.util.Collection<java.lang.String> getCountersFor(java.lang.Class<? extends java.lang.Enum> group)
group
- public abstract long getCounterValue(java.lang.Enum counter)
counter
- of type Enumpublic abstract long getCounterValue(java.lang.String group, java.lang.String counter)
group
- of type Stringcounter
- of type Stringpublic abstract void captureDetail()
public abstract java.util.Collection getChildren()
protected java.lang.String getStatsString()
public java.lang.String toString()
toString
in class java.lang.Object