org.apache.avalon.excalibur.event
Class AbstractQueue

java.lang.Object
  |
  +--org.apache.avalon.excalibur.event.AbstractQueue
All Implemented Interfaces:
Queue, Sink, Source
Direct Known Subclasses:
DefaultQueue, FixedSizeQueue

public abstract class AbstractQueue
extends java.lang.Object
implements Queue

The default queue implementation is a variable size queue.

Author:
Berin Loritsch

Field Summary
protected  long m_timeout
           
 
Constructor Summary
AbstractQueue()
           
 
Method Summary
protected  void block(java.lang.Object lock)
           
 int canAccept()
          Default for canAccept()
 boolean isFull()
          Default for isFull()
 int maxSize()
          Default maxSize to -1 which is unbounded
 void setTimeout(long millis)
          Set the timeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.avalon.excalibur.event.Source
enqueue, enqueue, prepareEnqueue, size, tryEnqueue
 
Methods inherited from interface org.apache.avalon.excalibur.event.Sink
dequeue, dequeue, dequeueAll, size
 

Field Detail

m_timeout

protected long m_timeout
Constructor Detail

AbstractQueue

public AbstractQueue()
Method Detail

canAccept

public int canAccept()
Default for canAccept()
Specified by:
canAccept in interface Source

maxSize

public int maxSize()
Default maxSize to -1 which is unbounded
Specified by:
maxSize in interface Source
Following copied from interface: org.apache.avalon.excalibur.event.Source
Returns:
-1 if the sink has no length threshold.

isFull

public boolean isFull()
Default for isFull()
Specified by:
isFull in interface Source

setTimeout

public void setTimeout(long millis)
Set the timeout
Specified by:
setTimeout in interface Sink

block

protected void block(java.lang.Object lock)


Copyright 2001 Apache Jakarta Project. All Rights Reserved.