Sequential data queues
Entries on a sequential data queue on the server are removed in
first-in first-out (FIFO) or last-in first-out (LIFO) sequence. The
BaseDataQueue and
DataQueue classes provide the following methods for working
with sequential data queues:
-
Create a data queue on the server. The Java program must
specify the maximum size of an entry on the data queue. The Java
program can optionally specify additional data queue parameters
(FIFO vs LIFO, save sender information, specify authority
information, force to disk, and provide a queue description) when
the queue is created.
-
Peek at an entry on the data queue without removing it from the
queue. The Java program can wait or return immediately if no entry
is currently on the queue.
-
Read an entry off the queue. The Java program can wait or
return immediately if no entry is available on the queue.
-
Write an entry to the queue.
- Clear
all entries from the queue.
-
Delete the queue.
The BaseDataQueue class provides additional methods for
retrieving the attributes of the data queue.
Examples
Sequential data queue examples, in which the producer puts items
on a data queue, and the consumer takes the items off the queue and
processes them: