com.ibm.ras
Class RASQueue
- java.lang.Object
-
- com.ibm.ras.RASQueue
-
- All Implemented Interfaces:
- RASIQueue
Deprecated.As of WAS 6.0, recommend using java.util.logging
public class RASQueue extends java.lang.Object implements RASIQueue
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.- See Also:
RASIQueue
,RASCircularQueue
-
-
Constructor Summary
Constructors Constructor and Description RASQueue()
Deprecated.Creates aRASQueue
, whose size is unbounded.RASQueue(int size)
Deprecated.Creates aRASQueue
.
-
Method Summary
Methods Modifier and Type Method and Description java.lang.Object
dequeue()
Deprecated.Removes an object from the beginning of the queue.void
enqueue(java.lang.Object object)
Deprecated.Adds an object to the end of the queue.java.lang.Object
firstObject()
Deprecated.Returns the first object on the queue, but does not remove it from the queue.int
getMaximumQueueSize()
Deprecated.Gets the maximum number of objects which this queue will hold.int
getQueueSize()
Deprecated.Gets the current number of objects in this queue.boolean
isCircular()
Deprecated.Determines if the queue is circular.boolean
isEmpty()
Deprecated.Determines if the queue is empty.boolean
isFull()
Deprecated.Determines if the queue is full.void
requeue(java.lang.Object object)
Deprecated.Returns an object to the front of the queue.
-
-
-
Constructor Detail
-
RASQueue
public RASQueue()
Deprecated.Creates aRASQueue
, whose size is unbounded.
-
RASQueue
public RASQueue(int size) throws java.lang.IllegalArgumentException
Deprecated.Creates aRASQueue
.- Parameters:
size
- The number of objects that can be held in this queue.- Throws:
java.lang.IllegalArgumentException
- This exception is thrown if the size parameter is less than zero.
-
-
Method Detail
-
getQueueSize
public int getQueueSize()
Deprecated.Gets the current number of objects in this queue.- Specified by:
getQueueSize
in interfaceRASIQueue
- Returns:
- The current queue size.
-
getMaximumQueueSize
public int getMaximumQueueSize()
Deprecated.Gets the maximum number of objects which this queue will hold.- Specified by:
getMaximumQueueSize
in interfaceRASIQueue
- Returns:
- The maximum queue size.
-
isEmpty
public boolean isEmpty()
Deprecated.Determines if the queue is empty.
-
isFull
public boolean isFull()
Deprecated.Determines if the queue is full.
-
isCircular
public boolean isCircular()
Deprecated.Determines if the queue is circular. A circular queue always accepts new objects. If all slots are full, a new object replaces the oldest object in the queue.- Specified by:
isCircular
in interfaceRASIQueue
- Returns:
true
if this queue is circular, orfalse
otherwise. This queue always returnsfalse
.
-
enqueue
public void enqueue(java.lang.Object object) throws RASQueueFullException
Deprecated.Adds an object to the end of the queue. If the object isnull
, nothing is enqueued.- Specified by:
enqueue
in interfaceRASIQueue
- Parameters:
object
- The object to be placed on the queue.- Throws:
RASQueueFullException
- This exception is thrown if the queue is full.
-
dequeue
public java.lang.Object dequeue() throws RASQueueEmptyException
Deprecated.Removes an object from the beginning of the queue.- Specified by:
dequeue
in interfaceRASIQueue
- Returns:
- The first object in the queue.
- Throws:
RASQueueEmptyException
- This exception is thrown if the queue is empty.
-
requeue
public void requeue(java.lang.Object object)
Deprecated.Returns an object to the front of the queue. If the object isnull
, nothing is enqueued.
-
firstObject
public java.lang.Object firstObject() throws RASQueueEmptyException
Deprecated.Returns the first object on the queue, but does not remove it from the queue.- Specified by:
firstObject
in interfaceRASIQueue
- Returns:
- The first object in the queue.
- Throws:
RASQueueEmptyException
- This exception is thrown if the queue is empty.
-
-