com.bea.wlai
Class ApplicationViewStatistics

java.lang.Object
  extended by com.bea.wlai.ApplicationViewStatistics
All Implemented Interfaces:
Serializable

public class ApplicationViewStatistics
extends Object
implements Serializable

Represents all statistics known about a single ApplicationView. This class is thread-safe.

See Also:
Serialized Form

Constructor Summary
ApplicationViewStatistics(String id)
           
ApplicationViewStatistics(String id, Iterator eventNames, Iterator serviceNames)
           
 
Method Summary
 void addAsyncServiceWaitTime(long time)
          Add a individual wait time (in milliseconds) for a single request that was just processed off the async service request queue.
 void combine(ApplicationViewStatistics stats)
          Aggregate the given statistics with this statistics object.
 long getAverageAsyncServiceWaitTime()
          Get the average number of milliseconds async service requests wait on the async service request queue before being processed.
 EventStatistics getEventStatistics(String eventName, boolean forUpdate)
          Get an EventStatistics instance representing stats for the event given by eventName, or aggregate stats across all events for this AppView if eventName is null.
 String getID()
          Get the ID of the ApplicationView these statistics represent.
 long getLastEventCountResetTime()
          Get the last time at which event counts were reset.
 long getLastEventDeliveryTime()
          Get the last time at which an event was delivered for this AppView.
 long getLastServiceCountResetTime()
          Get the last time at which service counts were reset.
 long getLastServiceInvocationTime()
          Get the last time at which a service was invoked on this AppView.
 ServiceStatistics getServiceStatistics(String serviceName, boolean forUpdate)
          Get a ServiceStatistics instance representing stats for the service given by serviceName, or aggregate stats across all services for this AppView if serviceName is null.
 void resetEventCounts()
          Reset all raw event counters to 0 (this does not include suspended event count), and note the time at which the counts were reset.
 void resetServiceCounts()
          Reset all raw service counters to 0 (this does not include suspended service count), and note the time at which the counts were reset.
 void resetSuspendedAsyncServiceCounts()
          Reset the suspended async service count for all services on this AppView to zero.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationViewStatistics

public ApplicationViewStatistics(String id)

ApplicationViewStatistics

public ApplicationViewStatistics(String id,
                                 Iterator eventNames,
                                 Iterator serviceNames)
Method Detail

combine

public void combine(ApplicationViewStatistics stats)
Aggregate the given statistics with this statistics object. The details of the aggregation for each field depends on the type of statistic the field represents. Fields representing absolute counts are simply summed. Fields representing averages are averaged together.

Parameters:
stats -

getID

public String getID()
Get the ID of the ApplicationView these statistics represent.

Returns:

getEventStatistics

public EventStatistics getEventStatistics(String eventName,
                                          boolean forUpdate)
Get an EventStatistics instance representing stats for the event given by eventName, or aggregate stats across all events for this AppView if eventName is null.


getServiceStatistics

public ServiceStatistics getServiceStatistics(String serviceName,
                                              boolean forUpdate)
Get a ServiceStatistics instance representing stats for the service given by serviceName, or aggregate stats across all services for this AppView if serviceName is null.


resetEventCounts

public void resetEventCounts()
Reset all raw event counters to 0 (this does not include suspended event count), and note the time at which the counts were reset.


resetServiceCounts

public void resetServiceCounts()
Reset all raw service counters to 0 (this does not include suspended service count), and note the time at which the counts were reset.


getLastEventCountResetTime

public long getLastEventCountResetTime()
Get the last time at which event counts were reset.

Returns:

getLastServiceCountResetTime

public long getLastServiceCountResetTime()
Get the last time at which service counts were reset.

Returns:

resetSuspendedAsyncServiceCounts

public void resetSuspendedAsyncServiceCounts()
Reset the suspended async service count for all services on this AppView to zero. This method should only be used when it is known that there are no suspended async services, and the current count is incorrect due to transaction rollbacks in the async service processor.


getLastEventDeliveryTime

public long getLastEventDeliveryTime()
Get the last time at which an event was delivered for this AppView.

Returns:

getLastServiceInvocationTime

public long getLastServiceInvocationTime()
Get the last time at which a service was invoked on this AppView.

Returns:

getAverageAsyncServiceWaitTime

public long getAverageAsyncServiceWaitTime()
Get the average number of milliseconds async service requests wait on the async service request queue before being processed.

Returns:

addAsyncServiceWaitTime

public void addAsyncServiceWaitTime(long time)
Add a individual wait time (in milliseconds) for a single request that was just processed off the async service request queue.

Parameters:
time -