org.glite.authz.common
Class ServiceMetrics

java.lang.Object
  extended by org.glite.authz.common.ServiceMetrics

@ThreadSafe
public class ServiceMetrics
extends java.lang.Object

A set of metrics kept about a running service.


Constructor Summary
ServiceMetrics(java.lang.String id, java.lang.String version)
          Constructor.
 
Method Summary
 java.lang.String getServiceId()
          Gets an identifier for the service whose metrics are being tracked.
 long getServiceStartupTime()
          Gets the time that the service was started.
 long getTotalServiceRequestErrors()
          Gets the total number of requests that error'ed out.
 long getTotalServiceRequests()
          Gets the total number of completed requests, successful or otherwise, serviced.
 void incrementTotalServiceRequestErrors()
          Adds one to the total number of requests that have error'ed out.
 void incrementTotalServiceRequests()
          Adds one to the total number of requests.
 void printServiceMetrics(java.io.PrintWriter writer)
          Prints metric information to the output writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceMetrics

public ServiceMetrics(java.lang.String id,
                      java.lang.String version)
Constructor. �

Parameters:
id - ID of the service whose metrics are being tracked
version - Version of the service whose metrics are being tracked
Method Detail

getServiceId

public java.lang.String getServiceId()
Gets an identifier for the service whose metrics are being tracked.

Returns:
the identifier for the service whose metrics are being tracked

getServiceStartupTime

public long getServiceStartupTime()
Gets the time that the service was started. The time is expressed in the system's default timezone.

Returns:
time that PEP daemon was started

getTotalServiceRequests

public long getTotalServiceRequests()
Gets the total number of completed requests, successful or otherwise, serviced.

Returns:
total number of completed requests

incrementTotalServiceRequests

public void incrementTotalServiceRequests()
Adds one to the total number of requests.


getTotalServiceRequestErrors

public long getTotalServiceRequestErrors()
Gets the total number of requests that error'ed out.

Returns:
total number of requests that error'ed out

incrementTotalServiceRequestErrors

public void incrementTotalServiceRequestErrors()
Adds one to the total number of requests that have error'ed out.


printServiceMetrics

public void printServiceMetrics(java.io.PrintWriter writer)
Prints metric information to the output writer. The following lines are printed:

Parameters:
writer - writer to which metrics are printed


Copyright © 2008-2012 EMI - European Middleware Initiative. All Rights Reserved.