org.ourgrid.common.util
Class TimeDataGenerator

java.lang.Object
  extended by org.ourgrid.common.util.TimeDataGenerator
All Implemented Interfaces:
java.io.Serializable

public class TimeDataGenerator
extends java.lang.Object
implements java.io.Serializable

Description:This class generates data about the execution of a replica

Version:
1.0 Created on 23/08/2004
See Also:
Serialized Form

Constructor Summary
TimeDataGenerator(java.lang.String text)
          Constructor method
 
Method Summary
 long getEndTime()
           
 java.lang.String getPreText()
          This method returns the initial part of caption text of this object
 long getStartTime()
           
 boolean isValid()
          This method verifies if the StartTime and EndTime are not a valid time stamp.
 void report()
          This method report the times collect
 void setEndTime()
          This method sets the end time of an execution
 void setPreText(java.lang.String newText)
          This method sets the initial part of the caption text of this object
 void setStartTime()
          This method sets the start time of an execution
 java.lang.String toString()
          Returns a string representation ot this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeDataGenerator

public TimeDataGenerator(java.lang.String text)
Constructor method

Parameters:
text - the name of the time collection
Method Detail

setPreText

public void setPreText(java.lang.String newText)
This method sets the initial part of the caption text of this object

Parameters:
newText - the name of the time collection

getPreText

public java.lang.String getPreText()
This method returns the initial part of caption text of this object

Returns:
A string representing the initial part of caption text of this object

setStartTime

public void setStartTime()
This method sets the start time of an execution


setEndTime

public void setEndTime()
This method sets the end time of an execution


report

public void report()
This method report the times collect


toString

public java.lang.String toString()
Returns a string representation ot this object.

Overrides:
toString in class java.lang.Object

getStartTime

public long getStartTime()

getEndTime

public long getEndTime()

isValid

public boolean isValid()
This method verifies if the StartTime and EndTime are not a valid time stamp. By an invalid timestamp we mean that the replica phase were not started or interrupted during its execution.

Returns:
true if StarTime and EndTime timestamps were marked. false otherwise.