net.kano.joscar.ratelim
Class RateQueue

java.lang.Object
  extended byRateQueue

public class RateQueue
extends java.lang.Object

Manages a single queue for a single rate class of a SNAC connection. This class basically wraps a plain old queue, and its existence is thus rather questionable. However, functionality might be added later, so this class stays.


Method Summary
 ConnectionQueueMgr getParentMgr()
          Returns this rate queue's "parent" connection queue manager.
 int getQueueSize()
          Returns the number of requests currently waiting in this queue.
 RateClassMonitor getRateClassMonitor()
          Returns the rate class monitor associated with this rate queue.
 boolean hasRequests()
          Returns whether any requests are waiting in this queue.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getParentMgr

public ConnectionQueueMgr getParentMgr()
Returns this rate queue's "parent" connection queue manager.

Returns:
this rate queue's "parent" connection queue manager

getRateClassMonitor

public RateClassMonitor getRateClassMonitor()
Returns the rate class monitor associated with this rate queue.

Returns:
this rate queue's associated rate class monitor

getQueueSize

public int getQueueSize()
Returns the number of requests currently waiting in this queue.

Returns:
the number of requests currently waiting in this queue

hasRequests

public boolean hasRequests()
Returns whether any requests are waiting in this queue.

Returns:
whether any requests are currently in this queue