| Prev | Start of Chapter | Next Chapter | Contents | Index | (7 out of 7)

Customizing Queues

You can specify how NOL adds entries to a queue, including:

To configure the queue:

NOL displays the configure dialog for the Error queue:


The following headings explain each of these settings.

Logging Queue Entries

You have two options for logging queue entries:

You can select one, both, or neither of these options to log entries to the queue only, to the log file only, to both the queue and the log file, or to not log entries at all.

You can manually add entries to the queue using the Save to File entry button. See "Save to File".

When logging entries to a file, NOL logs each new entry and each change to existing entries as they arrive. Beware that file logging can slow down your application and create huge files.

Log files contain ASCII text, which means you can view and print them using external applications. There is no facility within NOL to load an existing log file.


Note: If you disable file logging and you attempt to delete queue entries using the Delete entry button or the Flush Queue queue button, the entries do not appear to be deleted from the queue. NOL removes the deleted entries only when file logging is enabled. Therefore, you should always delete entries from the queue before disabling file logging.

Naming the Log File

To specify the name of the log file, enter a valid directory specification for Log Directory, and specify a filename in Log Filename Template. If the file name contains the character "*", NOL replaces it with the day and time the file was created. For example, the filename "gmq-*.log" produces the file "gmq-9011994- 16:15.log", if you create it on September 1, 1994 at 4:15pm. (9 is the month, 01 is the day, 1994 is the year, and 16:15 is the time.)


Caution: If you change the name of or edit the log file while NOL is running, the queue closes the old log file and opens a new log file with the new name.

Sorting Entries

You can specify how NOL sorts the entries in a queue. Sorting controls how NOL displays entries in the queue, as well as how NOL deletes entries from the queue when the maximum number of entries is exceeded. For more information, see "Setting the Maximum Number of Entries".

The queue first sorts the entries according to the attribute named in Primary Sort Attribute. If more than one entry has the same value for that attribute, the queue then sorts those entries according to the attribute named in Secondary Sort Attribute field. These are the possible attributes:

The attribute... Sorts entities by...
Creation Time
The time the entry was created.
Expiration Time
The time the entry will be deleted from the queue.
Severity
The severity of the alarm. Specify a number from 1 to 15, where 1 is the highest severity and 15 is the lowest.

The Secondary Sort Attribute can also be NA. If there is more than one entry with the same value for the Primary Sort Attribute and the Secondary Sort Attribute is NA, the queue does not put those entries in any particular order.

You can also specify whether the queue sorts the entries in ascending or descending order, by setting Primary Sort Mode and Secondary Sort Mode. If you choose Ascending, NOL displays entries with smaller values first. If you choose Descending, NOL displays entries with larger values first. Note that choosing ascending order of severity places entries with the highest severity (1) before entries with lower severity.

If you create your own entry object definition, you can also use attributes specific to that object definition. Make sure that you use an attribute that is in all entries that could be in the queue. If an entry does not contain an attribute, the queue signals an error.

For example, you can sort entries by Creation Time in descending order, so the newest entry is first, and the oldest entry is last. When the queue needs to delete entries, it deletes the oldest entries first. If two entries have the same Creation Time, the queue does not put them in any particular order.

As another example, you can sort entries by Severity in ascending order and then by Creation Time in descending order so that the most recent of the most urgent entries is first. When the queue needs to delete entries, it deletes the least recent of the least urgent entries first.

Allowing Duplicate Entries

If you select the Allow Duplicates option, the queue can contain more than one copy of the same entry. Otherwise, the queue contains only one copy of each entry.

NOL determines if an entry is a duplicate by looking at its ID number, which is a number NOL assigns to the entry when it is created.

Alerting the Operator to New Entries with a Beep

To alert the operator with a beep when a new entry is added to a queue, select the Beep for New Entry option. The queue beeps when it receives a new entry.

Setting the Maximum Number of Entries

To set the maximum number of entries allowed in a queue, specify an integer for Maximum Number of Entries. When the number of entries exceeds this maximum, NOL deletes entries from the end of the queue.

Since NOL deletes entries from the end of the queue, and you can determine the sort order for entries, you can control which entries NOL deletes first. For example, if you sort the entries by Creation Time in descending order, NOL deletes its oldest entries first. If you sort the entries by Severity in ascending order, NOL deletes its least urgent entry first. For more information on setting the sort order, see "Sorting Entries".

In general, use a value for Maximum Number of Entries between 50 and 500. If the value is too high, the queue uses a lot of memory and NOL can slow down significantly. If the value is too low, NOL may delete entries you still need.


Note: In order to maintain the maximum number of entries in a queue, NOL may delete entries that you cannot delete with the Delete Entry button. For example, in order to maintain the maximum, NOL may delete an unacknowledged entry, which you could not otherwise delete.

Setting the Priority

To set the priority that NOL uses to schedule the queue's actions, set Update Priority to any number from 1 to 10, where 1 is the highest priority and 10 is the lowest

| Prev | Start of Chapter | Next Chapter | Contents | Index | (7 out of 7)

Copyright © 1996, Gensym Corporation, Inc.