com.ibm.ras

Class RASCircularQueue

  1. java.lang.Object
  2. extended bycom.ibm.ras.RASCircularQueue
All implemented interfaces:
RASIQueue

Deprecated. As of WAS 6.0, recommend using java.util.logging
  1. public class RASCircularQueue
  2. extends java.lang.Object
  3. implements RASIQueue
RASCircularQueue is a circular queue for RAS events. When the queue fills, the next RAS event replaces the oldest event already in the queue.
See Also:
RASIQueue, RASQueue

Field Summary

Modifier and Type Field and Description
  1. static
  2. int
DEFAULT_QUEUE_SIZE
Deprecated. The default queue size (10,000).

Constructor Summary

Constructor and Description
RASCircularQueue()
Deprecated. Creates a RASCircularQueue, whose size is defined by DEFAULT_QUEUE_SIZE.
RASCircularQueue(int size)
Deprecated. Creates a RASCircularQueue.

Method Summary

Modifier and Type Method and Description
  1. java.lang.Object
dequeue()
Deprecated. Removes an object from the beginning of the queue.
  1. void
enqueue(java.lang.Object object)
Deprecated. Adds an object to the end of the queue.
  1. java.lang.Object
firstObject()
Deprecated. Returns the first object on the queue, but does not remove it from the queue.
  1. int
getMaximumQueueSize()
Deprecated. Gets the maximum number of objects which this queue will hold.
  1. int
getQueueSize()
Deprecated. Gets the current number of objects in this queue.
  1. boolean
isCircular()
Deprecated. Determines if the queue is circular.
  1. boolean
isEmpty()
Deprecated. Determines if the queue is empty.
  1. boolean
isFull()
Deprecated. Determines if the queue is full.
  1. void
requeue(java.lang.Object object)
Deprecated. 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

Field Detail

DEFAULT_QUEUE_SIZE

  1. public static final int DEFAULT_QUEUE_SIZE
Deprecated.
The default queue size (10,000).
See Also:

Constructor Detail

RASCircularQueue

  1. public RASCircularQueue()
Deprecated.
Creates a RASCircularQueue, whose size is defined by DEFAULT_QUEUE_SIZE.

RASCircularQueue

  1. public RASCircularQueue(int size)
  2. throws java.lang.IllegalArgumentException
Deprecated.
Creates a RASCircularQueue.
Parameters:
size - The number of objects that this queue can hold. If the size is zero, the queue size is set to DEFAULT_QUEUE_SIZE.
Throws:
java.lang.IllegalArgumentException - This exception is thrown if the size parameter is less than zero.

Method Detail

getQueueSize

  1. public int getQueueSize()
Deprecated.
Gets the current number of objects in this queue.
Specified by:
getQueueSize in interface RASIQueue
Returns:
The current queue size.

getMaximumQueueSize

  1. public int getMaximumQueueSize( )
Deprecated.
Gets the maximum number of objects which this queue will hold.
Specified by:
Returns:
The maximum queue size.

isEmpty

  1. public boolean isEmpty()
Deprecated.
Determines if the queue is empty.
Specified by:
isEmpty in interface RASIQueue
Returns:
true if the queue is empty or false otherwise.

isFull

  1. public boolean isFull()
Deprecated.
Determines if the queue is full.
Specified by:
isFull in interface RASIQueue
Returns:
true if the queue is full or false otherwise. (This queue always returns false.)

isCircular

  1. 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 interface RASIQueue
Returns:
true if this queue is circular, or false otherwise. (This queue always returns true.)

enqueue

  1. public void enqueue(java.lang.Object object)
  2. throws RASQueueFullException
Deprecated.
Adds an object to the end of the queue. If the object is null, nothing is enqueued.
Specified by:
enqueue in interface RASIQueue
Parameters:
object - The object to be placed on the queue.
Throws:
RASQueueFullException - This exception is thrown if the queue is full.

dequeue

  1. public java.lang.Object dequeue( )
  2. throws RASQueueEmptyException
Deprecated.
Removes an object from the beginning of the queue.
Specified by:
dequeue in interface RASIQueue
Returns:
The first object in the queue.
Throws:
RASQueueEmptyException - This exception is thrown if the queue is empty.

requeue

  1. public void requeue(java.lang.Object object)
  2. throws java.lang.IllegalStateException
Deprecated.
Returns an object to the front of the queue. If the object is null, nothing is enqueued.
Specified by:
requeue in interface RASIQueue
Parameters:
object - The object to be placed on the queue.
Throws:
java.lang.IllegalStateException - This exception is always thrown because there is no way to reliably add an object to the beginning of a circular queue if objects are added and removed via enqueue and dequeue. See RASQueue.requeue.

firstObject

  1. public java.lang.Object firstObject( )
  2. throws RASQueueEmptyException
Deprecated.
Returns the first object on the queue, but does not remove it from the queue.
Specified by:
firstObject in interface RASIQueue
Returns:
The first object in the queue.
Throws:
RASQueueEmptyException - This exception is thrown if the queue is empty.