Keyed data queues
The BaseDataQueue and KeyedDataQueue classes provide the following methods for working with keyed data queues:
- Create a keyed data queue on the AS/400.
The Java program must specify key length and maximum size of an entry on the queue.
The Java program can optionally specify authority information,
save sender information,
force to disk,
and provide a queue description.
- Peek at an entry based on the specified key
without removing it from the queue.
The Java program can wait or return immediately if no entry is currently on the queue that matches the key criteria.
- Read an entry off the queue based on the specified key.
The Java program can wait or return immediately if no entry is available on the queue that matches the key criteria.
- Write a keyed entry to the queue.
- Clear all entries or all entries that match a specified key.
- Delete the queue.
The BaseDataQueue and KeyedDataQueue classes also provide additional methods for retrieving the attributes of the data queue.
Examples
In the following keyed data queue examples, the producer puts items on a data queue, and the consumer takes the items off the queue and processes them:
[ Legal | AS/400 Glossary ]
|