cwbDQ_SetOrder
Use the cwbDQ_SetOrder command.
Purpose
Set the attribute for the queue order. If the order is CWBDQ_SEQ_LIFO, the last record written is the first record read (Last In First Out). If the order is CWBDQ_SEQ_FIFO, the first record written is the first record read (First In First Out). If the order is CWBDQ_SEQ_KEYED, the order in which records are read from the data queue depends on the value of the search order attribute of the data object and the key value specified for the cwbDQ_SetKey API. If multiple records contain the key that satisfies the search order, a FIFO scheme is used among those records.
Syntax
unsigned int CWB_ENTRY cwbDQ_SetOrder(
cwbDQ_Attr queueAttributes,
unsigned short order);
Parameters
- cwbDQ_Attr queueAttributes - input
- Handle of the data queue attributes returned by a previous call to cwbDQ_CreateAttr.
- unsigned short order - input
- Order in which new entries will be enqueued. Use one of the following
defined types for order:
- CWBDQ_SEQ_LIFO
- CWBDQ_SEQ_FIFO
- CWBDQ_SEQ_KEYED
Return Codes
The following list shows common return values.
- CWB_OK
- Successful completion.
- CWBDQ_INVALID_ATTRIBUTE_HANDLE
- Invalid attributes handle.
- CWBDQ_INVALID_ORDER
- Invalid queue order.
Usage
None