|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.ras.RASQueue
RASQueue is a buffer for RAS events. If the size of the queue is set to zero, the queue is not limited in capacity (except by the amount of memory installed in the computer). If the size is greater than zero, the queue will hold the specified number of objects.
RASIQueue
,
RASCircularQueue
Constructor Summary | |
---|---|
RASQueue()
Creates a RASQueue, whose size is unbounded. |
|
RASQueue(int size)
Creates a RASQueue. |
Method Summary | |
---|---|
java.lang.Object |
dequeue()
Removes an object from the beginning of the queue. |
void |
enqueue(java.lang.Object object)
Adds an object to the end of the queue. |
java.lang.Object |
firstObject()
Returns the first object on the queue, but does not remove it from the queue. |
int |
getMaximumQueueSize()
Gets the maximum number of objects which this queue will hold. |
int |
getQueueSize()
Gets the current number of objects in this queue. |
boolean |
isCircular()
Determines if the queue is circular. |
boolean |
isEmpty()
Determines if the queue is empty. |
boolean |
isFull()
Determines if the queue is full. |
void |
requeue(java.lang.Object object)
Returns an object to the front of the queue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RASQueue()
public RASQueue(int size) throws java.lang.IllegalArgumentException
size
- The number of objects that can be held in this queue.java.lang.IllegalArgumentException
- This exception is thrown if the size parameter is less than zero.Method Detail |
public int getQueueSize()
getQueueSize
in interface RASIQueue
public int getMaximumQueueSize()
getMaximumQueueSize
in interface RASIQueue
public boolean isEmpty()
isEmpty
in interface RASIQueue
false
otherwise.public boolean isFull()
isFull
in interface RASIQueue
false
otherwise.public boolean isCircular()
isCircular
in interface RASIQueue
false
otherwise. This queue always returns false.public void enqueue(java.lang.Object object) throws RASQueueFullException
enqueue
in interface RASIQueue
object
- The object to be placed on the queue.RASQueueFullException
- This exception is thrown if the queue is full.public java.lang.Object dequeue() throws RASQueueEmptyException
dequeue
in interface RASIQueue
RASQueueEmptyException
- This exception is thrown if the queue is empty.public void requeue(java.lang.Object object)
requeue
in interface RASIQueue
object
- The object to be placed on the queue.public java.lang.Object firstObject() throws RASQueueEmptyException
firstObject
in interface RASIQueue
RASQueueEmptyException
- This exception is thrown if the queue is empty.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |