cascading.stats
Class CascadingStats

java.lang.Object
  extended by cascading.stats.CascadingStats
Direct Known Subclasses:
CascadeStats, FlowStats

public class CascadingStats
extends Object

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.

See Also:
FlowStats, CascadeStats

Method Summary
 long getDuration()
          Method getDuration returns the duration the work executed before being finished.
protected  String getStatsString()
           
 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 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.
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

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.

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.


getDuration

public long getDuration()
Method getDuration returns the duration the work executed before being finished.

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

getStatsString

protected String getStatsString()

toString

public String toString()
Overrides:
toString in class Object


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