org.springframework.util
Interface ResponseTimeMonitor

All Known Implementing Classes:
ResponseTimeMonitorImpl

public interface ResponseTimeMonitor

Interface implemented by objects that can provide performance information as well as a record of the number of times they are accessed.

Implementing objects must ensure that implementing this interface does not compromise thread safety. However, it may be acceptable for slight innaccuracies in reported statistics to result from the avoidance of synchronization: performance may be well be more important than exact reporting, so long as the errors are not likely to be misleading.

Author:
Rod Johnson
Version: $Id: ResponseTimeMonitor.java,v 1.2 2004/01/04 23:43:42 jhoeller Exp $
Since: November 21, 2000

Method Summary
 intgetAccessCount()
          Return the number of accesses to this resource.
 intgetAverageResponseTimeMillis()
          Return the average response time in milliseconds.
 intgetBestResponseTimeMillis()
          Return the best (quickest) response time in milliseconds.
 intgetWorstResponseTimeMillis()
          Return the worst (slowest) response time in milliseconds.

Method Detail

getAccessCount

public int getAccessCount()
Return the number of accesses to this resource.

getAverageResponseTimeMillis

public int getAverageResponseTimeMillis()
Return the average response time in milliseconds.

getBestResponseTimeMillis

public int getBestResponseTimeMillis()
Return the best (quickest) response time in milliseconds.

getWorstResponseTimeMillis

public int getWorstResponseTimeMillis()
Return the worst (slowest) response time in milliseconds.