com.resilientedge.util.workerPool
Class WaitQStats

java.lang.Object
  |
  +--com.resilientedge.util.workerPool.WaitQStats
All Implemented Interfaces:
java.lang.Cloneable

public class WaitQStats
extends java.lang.Object
implements java.lang.Cloneable

Statistics related to wait queues.

Author:
odh

Constructor Summary
WaitQStats()
          Default constructor.
WaitQStats(java.lang.String qid)
          Constructor to specify an identifier for the queue.
 
Method Summary
 java.lang.Object clone()
          Make a copy of the statistics.
 long getAvgWaitTime()
           
 java.lang.String getId()
           
 int getMaxWaitCount()
           
 long getMaxWaitTime()
           
 int getNotifyCount()
           
 long getTimeoutCount()
           
 int getWaitCount()
           
 long getWaitTime()
           
 int incrNotifyCount()
          Adjust by 1 the number of times a notification has been made
 long incrTimeoutCount()
          Adjust by 1 the total wait number of times a wait-time has expired.
 int incrWaitCount(int qCount)
          Adjust by 1 the count of the total number of items that have been placed in the wait queue.
 long incrWaitTime(long tm)
          Adjust the total time (ms) for all queue item waits
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WaitQStats

public WaitQStats()
Default constructor.

WaitQStats

public WaitQStats(java.lang.String qid)
Constructor to specify an identifier for the queue.
Parameters:
qid - a queue identifier
Method Detail

getId

public java.lang.String getId()
Returns:
the identifier for queue's stats

getWaitCount

public int getWaitCount()
Returns:
the total wait count

getMaxWaitCount

public int getMaxWaitCount()
Returns:
the maximum number of items ever in the queue

getTimeoutCount

public long getTimeoutCount()
Returns:
the total timeout count

getWaitTime

public long getWaitTime()
Returns:
the total wait time for all queue items

getMaxWaitTime

public long getMaxWaitTime()
Returns:
the maximum wait time for a single queue item

getNotifyCount

public int getNotifyCount()
Returns:
the notify count

getAvgWaitTime

public long getAvgWaitTime()
Returns:
the average wait time

clone

public java.lang.Object clone()
Make a copy of the statistics.
Overrides:
clone in class java.lang.Object
Returns:
a clone of these queue statistics

incrWaitCount

public int incrWaitCount(int qCount)
Adjust by 1 the count of the total number of items that have been placed in the wait queue.
Parameters:
qCount - Parameter Description
Returns:
the new total wait count

incrTimeoutCount

public long incrTimeoutCount()
Adjust by 1 the total wait number of times a wait-time has expired.
Returns:
the new total timeout count

incrWaitTime

public long incrWaitTime(long tm)
Adjust the total time (ms) for all queue item waits
Parameters:
tm - the number of milliseconds to increment the total wait time
Returns:
the new total wait time

incrNotifyCount

public int incrNotifyCount()
Adjust by 1 the number of times a notification has been made
Returns:
the new notify count

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the statistics


Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.