Interface RecordType2Event
-
- All Superinterfaces:
DataEvent
public interface RecordType2Event extends DataEvent
Provides information about a change to type 2 data in a record.
The
RecordType2Event
is provided in anonRecordType2Update
callback to aSubscriptionListener
.Type 2 data is a 2-dimensional array, where the type 2 index acts as a row key, and the field-value pairs are column keys and values. This type of record is often used to represent a level 2 order book, for example:
Stock (type2Index) BidSize Bid Ask AskSize ABN1 100 10.22 10.28 55 ZBN2 200 10.20 20.33 250 ARC 1 10.16 10.41 1 When the type 2 data is updated, the new values are sent as a set of
RecordType2Event
s, one event for each row of the record that has changed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
deleteAllRows()
Returns whether all rows should be deleted.boolean
deleteRow()
Returns whether the row should be deleted.java.util.Map<java.lang.String,java.lang.String>
getFields()
Returns the record fields relating to the event, as a collection of key-value pairs.java.lang.String
getType2IndexField()
Gets the type 2 index field relating to the event.-
Methods inherited from interface com.caplin.streamlink.DataEvent
getSubject, isImage
-
-
-
-
Method Detail
-
getFields
java.util.Map<java.lang.String,java.lang.String> getFields()
Returns the record fields relating to the event, as a collection of key-value pairs.
When a call to isImage() returns true, the subscription data event contains an image of the data for the subscribed item. All the fields comprising the record are present in the collection. The application must discard any values previously received and replace them with the values contained within the collection.
When a call to isImage() returns false, the subscription data event contains new data for the subscribed record. The values in the collection returned are an update to any values previously received and any application caches should be updated appropriately.
- Returns:
- the fields
-
getType2IndexField
java.lang.String getType2IndexField()
Gets the type 2 index field relating to the event.
A
RecordType2Event
contains information about one row of the type 2 data. The row is identified by the value of the type 2 index fieldname returned by this method.- Returns:
- the index field.
-
deleteRow
boolean deleteRow()
Returns whether the row should be deleted.
- Returns:
- true if the row should be deleted, otherwise false.
-
deleteAllRows
boolean deleteAllRows()
Returns whether all rows should be deleted.
- Returns:
- true if all rows should be deleted, otherwise false.
-
-