com.softwareag.tamino.db.api.logging
Class TTimeLogger

java.lang.Object
  extended by com.softwareag.tamino.db.api.logging.TTimeLogger

public class TTimeLogger
extends java.lang.Object

This is the central class to offer time logging of the API. Objects that want to trace periods of time require TTimekeeper objects from the TTimeLogger. This class implements the singleton pattern, i.e. there is always only one instance of this class available.

Version:
$Revision: 1.8 $
Author:
Oliver.Kleber@softwareag.com

Field Summary
static int COMPACT_OUTPUT
          Display the time keeper information in a summarized form.
static int FULL_OUTPUT
          Display the time keeper information completely.
static int UNIVERSAL_OUTPUT
          Display the time keeper information for internal performance measurements.
 
Method Summary
 TTimekeeper getCommunicationTimekeeper()
          Get a communication timekeeper used to measure the time from sending a request to Tamino until the whole answer is received.
static TTimeLogger getInstance()
          Gets the singleton TTimeLogger instance.
 TTimekeeper getParserTimekeeper()
          Get a parser timekeeper used to measure the time for the parsing of a document.
 TTimekeeper getServerTimekeeper(java.lang.String duration)
          Get a server timekeeper used to measure the total time for the processing in the Tamino Server - "ino:duration".
 TTimekeeper getTimekeeper()
          Get a unspecified timekeeper
 TTimekeeper getTimekeeper(java.lang.String message)
          Get a unspecified timekeeper
 TTimekeeper getTopTimekeeper(java.lang.String message)
          Get a top level timekeeper
 TTimekeeper getUniversalTimekeeper(java.lang.String message)
          Get a universal timekeeper
 boolean isLoggingOn()
          Test if time logging is enabled.
 void setLoggingOn(boolean enable)
          Sets whether or not time logging is on.
 void setOutputForm(int value)
          Which form will be used to output the time keeper information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FULL_OUTPUT

public static final int FULL_OUTPUT
Display the time keeper information completely.

See Also:
Constant Field Values

COMPACT_OUTPUT

public static final int COMPACT_OUTPUT
Display the time keeper information in a summarized form.

See Also:
Constant Field Values

UNIVERSAL_OUTPUT

public static final int UNIVERSAL_OUTPUT
Display the time keeper information for internal performance measurements.

See Also:
Constant Field Values
Method Detail

getInstance

public static TTimeLogger getInstance()
Gets the singleton TTimeLogger instance.

Returns:
the singleton TTimesLogger instance.

isLoggingOn

public boolean isLoggingOn()
Test if time logging is enabled.

Returns:
true if logging is enabled, false otherwise.

setLoggingOn

public void setLoggingOn(boolean enable)
Sets whether or not time logging is on.

Parameters:
If - true, time logging is enabled; otherwise it is disabled.

setOutputForm

public void setOutputForm(int value)
Which form will be used to output the time keeper information.

Parameters:
value - the form that will be used to output the time keeper information.

getTimekeeper

public TTimekeeper getTimekeeper(java.lang.String message)
Get a unspecified timekeeper

Parameters:
message - a description
Returns:
a timekeeper instance

getTimekeeper

public TTimekeeper getTimekeeper()
Get a unspecified timekeeper

Returns:
a timekeeper instance

getParserTimekeeper

public TTimekeeper getParserTimekeeper()
Get a parser timekeeper used to measure the time for the parsing of a document.

Returns:
a timekeeper instance

getServerTimekeeper

public TTimekeeper getServerTimekeeper(java.lang.String duration)
Get a server timekeeper used to measure the total time for the processing in the Tamino Server - "ino:duration".

Parameters:
duration - the total time for the processing in the Tamino Server
Returns:
a timekeeper instance

getCommunicationTimekeeper

public TTimekeeper getCommunicationTimekeeper()
Get a communication timekeeper used to measure the time from sending a request to Tamino until the whole answer is received.

Returns:
a timekeeper instance

getTopTimekeeper

public TTimekeeper getTopTimekeeper(java.lang.String message)
Get a top level timekeeper

Parameters:
message - a description
Returns:
a timekeeper instance

getUniversalTimekeeper

public TTimekeeper getUniversalTimekeeper(java.lang.String message)
Get a universal timekeeper

Parameters:
message - a description
Returns:
a timekeeper instance


Copyright (c) 2013 Software AG. All Rights Reserved.