ch.elca.el4j.services.statistics.detailed
Class MeasureId

java.lang.Object
  extended by ch.elca.el4j.services.statistics.detailed.MeasureId
All Implemented Interfaces:
Serializable

public class MeasureId
extends Object
implements Serializable

A MeasureID uniquely identifies a global measure.

The ID of a measure is made unique through :

Remark : the sequential number associated to each measure is not part of the measure ID. The ID of the measure is reused during the whole lifetime of an end-to-end measure (global measure with all its sub-measures). The sequential number will be increased for each sub-measure. This class was ported from Leaf 2. Original authors: YMA, DBA. Leaf2 package name: ch.elca.leaf.services.measuring

Author:
Rashid Waraich (RWA)
See Also:
Serialized Form
File-location:
MeasureId
Last check-in date:
2009-08-04 15:17:52 +0200 (Di, 04. Aug 2009) by swismer for revision 3880

Constructor Summary
MeasureId()
          Creates a MeasureID object for the localhost machine and with the current time.
MeasureId(String host, long invocationTime)
          Creates a MeasureID object for a given host and a given invocation time.
 
Method Summary
static MeasureId createID()
          Creates a new MeasureID object for the localhost machine and with the current time.
 String getFormattedString()
          Returns a human-readable representation of the measure ID.
 String getHost()
          Returns the host name of the measure ID.
 long getInvocationTime()
          Returns the invocation time of the measure ID.
 String toString()
          Returns a human-readable representation of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MeasureId

public MeasureId()
Creates a MeasureID object for the localhost machine and with the current time.


MeasureId

public MeasureId(String host,
                 long invocationTime)
Creates a MeasureID object for a given host and a given invocation time.

Parameters:
host - the host name of the ID
invocationTime - the invocation time of the ID
Method Detail

createID

public static MeasureId createID()
Creates a new MeasureID object for the localhost machine and with the current time.

Remark : This method should be called only by the client.

Returns:
new MeasureID object

getHost

public String getHost()
Returns the host name of the measure ID.

Returns:
host name

getInvocationTime

public long getInvocationTime()
Returns the invocation time of the measure ID.

Returns:
invocation time

getFormattedString

public String getFormattedString()
Returns a human-readable representation of the measure ID.

Returns:
measure representation

toString

public String toString()
Returns a human-readable representation of the object.

Overrides:
toString in class Object
Returns:
human-readable representation


Copyright © 2005-2011 ELCA. All Rights Reserved.