Interface RecordType1Event
-
- All Superinterfaces:
DataEvent
public interface RecordType1Event extends DataEvent
Provides information about a change to type 1 data (fieldname and data pairs) in a record.
The
RecordType1Event
is provided in anonRecordUpdate
callback to aSubscriptionListener
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.long
getLatency(java.lang.String timeStampField)
Gets the latency of the record in milliseconds.long
getTimeReceived()
Returns the time that the record data in the event was received at the client.-
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
-
getLatency
long getLatency(java.lang.String timeStampField)
Gets the latency of the record in milliseconds. StreamLink calculates the latency using the clock offset and the timestamp supplied in the
timeStampField field of the record.The latency cannot be calculated if
timeStampField is not present in the record or if the clock offset has not yet been established.- Parameters:
timeStampField
- The name of the field in the record containing the timestamp that StreamLink uses to calculate the latency of the record.- Returns:
- The latency of the record in milliseconds, or -1 if the latency cannot be calculated.
-
getTimeReceived
long getTimeReceived()
Returns the time that the record data in the event was received at the client.
- Returns:
- The time that the record data was received at the client in milliseconds since 1 January 1970 00:00:00 UTC.
-
-