|
 |
|
NOTE: This Design document is subject to change at any time. |
Queue
Syntax: <QUEUE property-list>Script</QUEUE>
The zQueue object inherits from the zCollection object. Like the Collection object, it stores a list of objects. However, the zQueue object allows you to manipulate either end of the collection for use as a queue, stack, or other similar data structure.
As a zApp object, a zQueue also has the ability to process each object in the queue via a script.
As with Collections, Queues are compatible with the Visual Basic "for each" statement.
A Queue can also have a set of inputs and outputs. This is usually used in conjunction with the processing of objects in the queue but can also be used with the COM object version of the zQueue.
Each Input and Output must be compatible with a zCollection object. So, other Queues can also be used as inputs and outputs.
When a new object is added to the Input collection of a Queue, it is processed by the Queue if the Manual property is set to false. If the Manual property is true, then the object is added to the queue but is not processed until the Process method is called.
Objects that suceed the processing step (which always suceeds in the COM object version), are then passed to the Output. If the Moved property is set, then the object is removed from the current queue and added to the output, otherwise the object is copied to the output.
If there are several outputs, the object is added to the next output in the list, which cycles sequentially between all outputs. This can be used for load balancing.
As a COM object with no processing script, a Queue with inputs and outputs can be used to consolidate multiple collections into a single collection, or to spread a single collection amoung multiple outputs.
Using the Zeus object with a processing script, objects that fail to pass the script either remain in the queue, or are never copied from the input in the first place. In other words, if an object is added directly to the queue but fails the processing, it remains in the queue (marked as processed). But when an object is added to an input of the queue and fails the processing script, then it is never added to the queue.
Only objects that succeed the processing will be copied or moved to the outputs. |
|