Table of Contents
Just a second...

DEPRECATED: Publishing using paged topics

Paged topics are topics that store current values as lines in a page. Paged topic data can be updated at any time using a set of methods that enable additions, updates, and deletions.

While paged topics have associated topic data, that data does not extend the PublishingTopicData interface. Because of this paged topics do not act in the same way as other stateful topics.

All of these methods lock the data, perform the update, notify any affected clients of changes as appropriate and unlock the data. If it is required to lock the data over more than one update so that it cannot be changed whilst manipulating it, use the lock() mechanism on the data.

The method signatures vary according to the type so the line referred to in the table below refers to a String or a record as appropriate.

Some methods are usable only with unordered topic data, some only with ordered, and some behave differently according to the type.

Methods for use with ordered topic data typically act on only one record at a time and do not require an index reference to the record.

Table 1. Usable methods with ordered topic data
add(line) Add the specified line to the end of the data (if unordered) or at the appropriate position (if ordered).
add(List<line>) Add the specified list of lines to the data. For unordered data the lines are all added at the end. For ordered data this is the same as calling add(line) repeatedly.
add(int,List<line>) Add the specified list of lines into the data at the specified index.
update(line) This is functionally equivalent to calling remove(line) followed by add(line).
remove(int,int) Removes one or more lines. The first number specified is the index to start from and the second is the number of lines to remove The code remove(0,1) removes the first line.
remove(line) The current line that is equal to the specified line according to the comparator is removed. If there is more than one matching line, the duplicates policy specifies which is removed. If no matching line is found, this has no effect.

Methods for use with unordered topic data typically requires an index reference to the record that they act on.

Table 2. Usable methods with unordered topic data
add(line) Add the specified line to the end of the data (if unordered) or at the appropriate position (if ordered).
add(List<line>) Add the specified list of lines to the data. For unordered data the lines are all added at the end. For ordered data this is the same as calling add(line) repeatedly.
add(int,line) Add the specified line into the data at the specified index. The line is inserted at the specified index. Indexing starts at 0. Using add(0,line) is the same as inserting the line at the start of the data.
add(int,List<line>) Add the specified list of lines into the data at the specified index.
update(int,line) Update the line at the specified index with the specified line. This effectively replaces the line with the one supplied.
remove(int,int) Removes one or more lines. The first number specified is the index to start from and the second is the number of lines to remove The code remove(0,1) removes the first line.

Methods are also available to get specified lines or a range of lines which might help in updating.