com.caucho.bam.mailbox
Class MailboxQueue

java.lang.Object
  extended by com.caucho.bam.mailbox.MailboxQueue

public final class MailboxQueue
extends java.lang.Object

See http://www.cs.rochester.edu/u/michael/PODC96.html


Constructor Summary
MailboxQueue(java.lang.String name, int discardMaxSize, int blockMaxSize, long expireTimeout)
           
 
Method Summary
 Packet dequeue()
          Returns the first packet from the queue.
 void enqueue(Packet packet)
           
 int getSize()
          Returns the number of packets in the queue.
 boolean isEmpty()
          Returns true if the queue is empty
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MailboxQueue

public MailboxQueue(java.lang.String name,
                    int discardMaxSize,
                    int blockMaxSize,
                    long expireTimeout)
Method Detail

getSize

public final int getSize()
Returns the number of packets in the queue.


isEmpty

public final boolean isEmpty()
Returns true if the queue is empty


enqueue

public final void enqueue(Packet packet)

dequeue

public final Packet dequeue()
Returns the first packet from the queue.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object