## cascading.stats
Class CascadingStats

    java.lang.Object
      cascading.stats.CascadingStats

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  CascadeStats, FlowStats, StepStats

    public abstract class CascadingStats

extends Object
implements Serializable

Class CascadingStats is the base class for all Cascading statistics gathering. It also reports the status of core elements that have state.

There are five states the stats object reports; pending, running, completed, failed, stopped, and finished.

- `pending` - when the Flow or Cascade has yet to start.
- `running` - when the Flow or Cascade is executing a workload.
- `successful` - when the Flow or Cascade naturally completed its workload without failure.
- `failed` - when the Flow or Cascade threw an error and failed to finish the workload.
- `stopped` - when the user calls stop() on the Flow or Cascade.
- `finished` - when the Flow or Cascade is no longer processing a workload and `completed`, `failed`, or `stopped` is true.

See Also:
  `CascadeStats`, `FlowStats`, `StepStats`, Serialized Form

Nested Class Summary
`static class` `CascadingStats.Status`

Method Summary
`abstract void` `captureDetail()` Method captureDetail will recursively capture details about nested systems.
`abstract Collection` `getChildren()`
`abstract Collection<String>` `getCounterGroups()` Method getCounterGroups returns all the available counter group names.
`abstract Collection<String>` `getCounterGroupsMatching(String regex)` Method getCounterGroupsMatching returns all the available counter group names that match the given regular expression.
`Collection<String>` `getCountersFor(Class<? extends Enum> group)` Method getCountersFor returns all the counter names for the counter enums.
`abstract Collection<String>` `getCountersFor(String group)` Method getCountersFor returns all the counter names for the give group name.
`abstract long` `getCounterValue(Enum counter)` Method getCounter returns the current value for the given counter Enum.
`abstract long` `getCounterValue(String group, 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 Object` `getID()` Method getID returns the ID of this CascadingStats object.
`String` `getName()` Method getName returns the name of this CascadingStats object.
`long` `getStartTime()` Method getStartTime returns the startTime of this CascadingStats object.
`protected String` `getStatsString()`
`CascadingStats.Status` `getStatus()` Method getStatus returns the status of this CascadingStats object.
`boolean` `isFailed()` Method isFailed returns true when the work ended with an error.
`boolean` `isFinished()` Method isFinished returns true if the current status show no work currently being executed.
`boolean` `isPending()` Method isPending returns true if no work has started.
`boolean` `isRunning()` Method isRunning returns true when work has begun.
`boolean` `isSkipped()` Method isSkipped returns true when the works was skipped.
`boolean` `isStopped()` Method isStopped returns true when the user stopped the work.
`boolean` `isSuccessful()` Method isSuccessful returns true when work has completed successfully.
`void` `markFailed(Throwable throwable)` Method markFailed sets the status to failed.
`void` `markRunning()` Method markRunning sets the status to running.
`void` `markSkipped()` Method markSkipped sets the status to skipped.
`protected void` `markStartTime()`
`void` `markStopped()` Method markStopped sets the status to stopped.
`void` `markSuccessful()` Method markSuccessful sets the status to successful.
`String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### getID

    public abstract Object getID()

  Method getID returns the ID of this CascadingStats object.

  Returns:
    the ID (type Object) of this CascadingStats object.

### getName

    public String getName()

  Method getName returns the name of this CascadingStats object.

  Returns:
    the name (type String) of this CascadingStats object.

### isFinished

    public boolean isFinished()

  Method isFinished returns true if the current status show no work currently being executed. This method returns true if `isSuccessful()`, `isFailed()`, or `isStopped()` returns true.

  Returns:
    the finished (type boolean) of this CascadingStats object.

### isPending

    public boolean isPending()

  Method isPending returns true if no work has started.

  Returns:
    the pending (type boolean) of this CascadingStats object.

### isRunning

    public boolean isRunning()

  Method isRunning returns true when work has begun.

  Returns:
    the running (type boolean) of this CascadingStats object.

### isSuccessful

    public boolean isSuccessful()

  Method isSuccessful returns true when work has completed successfully.

  Returns:
    the completed (type boolean) of this CascadingStats object.

### isFailed

    public boolean isFailed()

  Method isFailed returns true when the work ended with an error.

  Returns:
    the failed (type boolean) of this CascadingStats object.

### isStopped

    public boolean isStopped()

  Method isStopped returns true when the user stopped the work.

  Returns:
    the stopped (type boolean) of this CascadingStats object.

### isSkipped

    public boolean isSkipped()

  Method isSkipped returns true when the works was skipped.

  Flows are skipped if the apporpriate `FlowSkipStrategy.skipFlow(cascading.flow.Flow)` returns `true`;

  Returns:
    the skipped (type boolean) of this CascadingStats object.

### getStatus

    public CascadingStats.Status getStatus()

  Method getStatus returns the status of this CascadingStats object.

  Returns:
    the status (type Status) of this CascadingStats object.

### markRunning

    public void markRunning()

  Method markRunning sets the status to running.

### markStartTime

    protected void markStartTime()

### markSuccessful

    public void markSuccessful()

  Method markSuccessful sets the status to successful.

### markFailed

    public void markFailed(Throwable throwable)

  Method markFailed sets the status to failed.

  Parameters:
    `throwable` - of type Throwable

### markStopped

    public void markStopped()

  Method markStopped sets the status to stopped.

### markSkipped

    public void markSkipped()

  Method markSkipped sets the status to skipped.

### getStartTime

    public long getStartTime()

  Method getStartTime returns the startTime of this CascadingStats object.

  Returns:
    the startTime (type long) of this CascadingStats object.

### getFinishedTime

    public long getFinishedTime()

  Method getFinishedTime returns the finishedTime of this CascadingStats object.

  Returns:
    the finishedTime (type long) of this CascadingStats object.

### getDuration

    public long getDuration()

  Method getDuration returns the duration the work executed before being finished. This method will return zero until the work is finished. See `getCurrentDuration()` if you wish to poll for the current duration value.

  Returns:
    the duration (type long) of this CascadingStats object.

### getCurrentDuration

    public long getCurrentDuration()

  Method getCurrentDuration returns the current duration of the current work whether or not the work is finished. When finished, the return value will be the same as `getDuration()`.

  Returns:
    the currentDuration (type long) of this CascadingStats object.

### getCounterGroups

    public abstract Collection<String> getCounterGroups()

  Method getCounterGroups returns all the available counter group names.

  Returns:
    the counterGroups (type Collection<String>) of this CascadingStats object.

### getCounterGroupsMatching

    public abstract Collection<String> getCounterGroupsMatching(String regex)

  Method getCounterGroupsMatching returns all the available counter group names that match the given regular expression.

  Parameters:
    `regex` - of type String
  Returns:
    Collection<String>

### getCountersFor

    public abstract Collection<String> getCountersFor(String group)

  Method getCountersFor returns all the counter names for the give group name.

  Parameters:
    `group` -
  Returns:
    Collection<String>

### getCountersFor

    public Collection<String> getCountersFor(Class<? extends Enum> group)

  Method getCountersFor returns all the counter names for the counter enums.

  Parameters:
    `group` -
  Returns:
    Collection<String>

### getCounterValue

    public abstract long getCounterValue(Enum counter)

  Method getCounter returns the current value for the given counter Enum.

  Parameters:
    `counter` - of type Enum
  Returns:
    the current counter value

### getCounterValue

    public abstract long getCounterValue(String group,
                                         String counter)

  Method getCounter returns the current value for the given group and counter.

  Parameters:
    `group` - of type String
    `counter` - of type String
  Returns:
    the current counter value

### captureDetail

    public abstract void captureDetail()

  Method captureDetail will recursively capture details about nested systems. Use this method to persist statistics about a given Cascade, Flow, or FlowStep.

  Each CascadingStats object must be individually inspected for any system specific details.

### getChildren

    public abstract Collection getChildren()

### getStatsString

    protected String getStatsString()

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Copyright © 2007-2010 Concurrent, Inc. All Rights Reserved.