com.ibm.di.performance
Class PerfEntry

java.lang.Object
  extended by com.ibm.di.performance.PerfEntry

public class PerfEntry
extends Object

PerfEntry class represents the Performance Entry object.


Field Summary
static int BEGIN
           
static int END
           
static int NOT_DUAL
           
static int RESULT
           
static int USER
           
 
Constructor Summary
PerfEntry()
          Constructor for the Performance Entry
PerfEntry(String component)
          Constructor for the Performance Entry-Message mode
PerfEntry(String component, int dual)
          Constructor for the Performance Entry-BEGIN and END mode
PerfEntry(String component, long usedTime, long usedMemory, int dual)
          Constructor for the Performance Entry - ALL modes
 
Method Summary
static PerfEntry addPerfEntries(PerfEntry entry1, PerfEntry entry2)
          Gets the sum of the time stamps and Memory usage of 2 PerfEntry objects.
static PerfEntry diffPerfEntries(PerfEntry begin, PerfEntry end)
          Gets the difference of the time stamps and Memory usage of 2 PerfEntry objects.
 String dumpEntry()
          Dumps the performance Entry Object in display format
 boolean equalsPerfEntry(PerfEntry entry)
          Checks if the equality of two PerfEntry objects.
 String getBaseComponent()
          Method returns the name of the base component.
 String getComponent()
          Method gets the component name.
 int getDual()
          Gets the dual message.
 String getPerfEntryStats()
          Gets only the time stamp and memory usage for an entry .
 long getTimeStamp()
          Gets the time stamp of this PerfEntry
 long getUsedMemory()
          Gets the memory used.
 boolean isPair(PerfEntry entry)
          Checks if the PerfEntry objects are pairs.
 void setBaseComponent(String string)
          Sets the name of the base component.
 void setComponent(String string)
           
 void setDual(int i)
           
 void setTimeStamp(long time)
          Sets the time stamp value.
 void setUsedMemory(long memory)
          Sets the memory used value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEGIN

public static final int BEGIN
See Also:
Constant Field Values

END

public static final int END
See Also:
Constant Field Values

NOT_DUAL

public static final int NOT_DUAL
See Also:
Constant Field Values

RESULT

public static final int RESULT
See Also:
Constant Field Values

USER

public static final int USER
See Also:
Constant Field Values
Constructor Detail

PerfEntry

public PerfEntry()
Constructor for the Performance Entry


PerfEntry

public PerfEntry(String component)
Constructor for the Performance Entry-Message mode

Parameters:
component - The name of the component name.

PerfEntry

public PerfEntry(String component,
                 int dual)
Constructor for the Performance Entry-BEGIN and END mode

Parameters:
component - Component name
dual - Type of message PerfEntry.BEGIN or PerfEntry.END

PerfEntry

public PerfEntry(String component,
                 long usedTime,
                 long usedMemory,
                 int dual)
Constructor for the Performance Entry - ALL modes

Parameters:
component - Component name
usedTime - Time
usedMemory - memory
dual - type of message PerfEntry.BEGIN or PerfEntry.END
Method Detail

equalsPerfEntry

public boolean equalsPerfEntry(PerfEntry entry)
Checks if the equality of two PerfEntry objects. Checks if they have the same Component name.

Parameters:
entry - PerfEntry object
Returns:
true if Components and modes are equal

isPair

public boolean isPair(PerfEntry entry)
Checks if the PerfEntry objects are pairs. Checks if they have the same Component name.

Parameters:
entry - PerfEntry object
Returns:
true if Components are equal

diffPerfEntries

public static PerfEntry diffPerfEntries(PerfEntry begin,
                                        PerfEntry end)
Gets the difference of the time stamps and Memory usage of 2 PerfEntry objects.

Parameters:
begin - begin PerfEntry object
end - end PerfEntry object
Returns:
PerfEntry object with difference of time stamps and memory usage

addPerfEntries

public static PerfEntry addPerfEntries(PerfEntry entry1,
                                       PerfEntry entry2)
Gets the sum of the time stamps and Memory usage of 2 PerfEntry objects.

Parameters:
entry1 - PerfEntry object
entry2 - PerfEntry object
Returns:
PerfEntry object with sum of time stamps and memory usage.

dumpEntry

public String dumpEntry()
Dumps the performance Entry Object in display format

Returns:
String containing a dump of the entry Object in display format.

getPerfEntryStats

public String getPerfEntryStats()
Gets only the time stamp and memory usage for an entry .

Returns:
String containing the time stamp and memory usage.

getTimeStamp

public long getTimeStamp()
Gets the time stamp of this PerfEntry

Returns:
The value of the time stamp.

getUsedMemory

public long getUsedMemory()
Gets the memory used.

Returns:
Returns the memory used.

setTimeStamp

public void setTimeStamp(long time)
Sets the time stamp value.

Parameters:
time - The time stamp to set.

setUsedMemory

public void setUsedMemory(long memory)
Sets the memory used value.

Parameters:
memory - The memory used value.

getComponent

public String getComponent()
Method gets the component name.

Returns:
Returns a String containing the name of the component.

setComponent

public void setComponent(String string)
Parameters:
string -

getBaseComponent

public String getBaseComponent()
Method returns the name of the base component.

Returns:
Returns the name of the base component.

setBaseComponent

public void setBaseComponent(String string)
Sets the name of the base component.

Parameters:
string - The base component name to set.

getDual

public int getDual()
Gets the dual message.

Returns:
Returns the dual message.

setDual

public void setDual(int i)
Parameters:
i -