org.logicalcobwebs.proxool.admin
Class StatisticsResultMonitor
java.lang.Object
   org.logicalcobwebs.proxool.ResultMonitor
org.logicalcobwebs.proxool.ResultMonitor
       org.logicalcobwebs.proxool.admin.StatisticsResultMonitor
org.logicalcobwebs.proxool.admin.StatisticsResultMonitor
- public class StatisticsResultMonitor 
- extends ResultMonitor
A ResultMonitor specifically for Snapshots
- Since:
- Proxool 0.8
- Version:
- $Revision: 1.9 $, $Date: 2003/03/06 22:39:05 $
- Author:
- bill, $Author: billhorsman $ (current maintainer)
 
 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
LOG
private static final Log LOG
statistics
private StatisticsIF statistics
oldStatistics
private StatisticsIF oldStatistics
alias
private java.lang.String alias
token
private java.lang.String token
StatisticsResultMonitor
public StatisticsResultMonitor(java.lang.String alias,
                               java.lang.String token)
- Parameters:
- alias- so we can lookup the latest- statistics
- token- so we can lookup the latest- statistics
check
public boolean check()
              throws java.lang.Exception
- waits for statistics
 
- 
- Specified by:
- checkin class- ResultMonitor
 
- 
- Returns:
- ResultMonitor.SUCCESSor- ResultMonitor.TIMEOUT
- Throws:
- java.lang.Exception- if anything goes wrong
 
check
protected boolean check(StatisticsIF statistics)
- This gets called when we get new statistics. By overriding this
 method you get the option of rejecting these new statistics and
 waiting for the next set
 
- 
- Parameters:
- statistics- the newly created statistics
- Returns:
- true if we accept them, false if we want to wait for the next set
 (if you don't override this it will return true)
 
getResult
public int getResult()
              throws ProxoolException
- Description copied from class: ResultMonitor
- Wait for the result to happen, or for a timeout
 
- 
- Overrides:
- getResultin class- ResultMonitor
 
- 
- Returns:
- ResultMonitor.SUCCESSor- ResultMonitor.TIMEOUT
- Throws:
- ProxoolException- if the- ResultMonitor.check()threw an exception
- See Also:
- ResultMonitor.setTimeout(long)
 
getStatistics
public StatisticsIF getStatistics()
- Get the statistics used in the most recent check
 
- 
- Returns:
- snapshot