org.bitrepository.service.workflow
Class WorkflowStatistic

java.lang.Object
  extended by org.bitrepository.service.workflow.WorkflowStatistic

public class WorkflowStatistic
extends Object

Provides details about the statistics of an workflow. The statistics will not be fully populated until the workflow has finished.


Constructor Summary
WorkflowStatistic(String name)
          Creates a fresh WorkflowStatistic instance.
 
Method Summary
 void finish()
           
 void finishSubStatistic()
          Marks the end time of a sub step of the statistics statistics.
 WorkflowStatistic getCurrentSubStatistic()
          Will return the statistics for the current step if the workflow statistics have an active step.
 Date getFinish()
           
 String getFullStatistics()
           
 String getName()
           
 String getPartStatistics()
          Will generate a string of the form 'step duration'/'workflow duration'.
 Date getStart()
           
 void start()
          Marks the start time of the statistics.
 void startSubStatistic(String name)
          Marks the start time of a sub step of the statistics statistics.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WorkflowStatistic

public WorkflowStatistic(String name)
Creates a fresh WorkflowStatistic instance.

Parameters:
name - The name of this instance to be used as title for the statistics.
Method Detail

start

public void start()
Marks the start time of the statistics.


startSubStatistic

public void startSubStatistic(String name)
Marks the start time of a sub step of the statistics statistics.

Parameters:
name - The name of the substep to be used as identifier in the statistics.

finishSubStatistic

public void finishSubStatistic()
Marks the end time of a sub step of the statistics statistics.


getFullStatistics

public String getFullStatistics()
Returns:
A string representation of statistics, including all substatistics.

getPartStatistics

public String getPartStatistics()
Will generate a string of the form 'step duration'/'workflow duration'. If the workflow isn't running a "Not running" string will be returned.

Returns:

getCurrentSubStatistic

public WorkflowStatistic getCurrentSubStatistic()
Will return the statistics for the current step if the workflow statistics have an active step.

Returns:

getStart

public Date getStart()

getFinish

public Date getFinish()

finish

public void finish()

getName

public String getName()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010-2013 The State and University Library, The Royal Library and The State Archives, Denmark. All Rights Reserved.