public class DataEvent extends EntityEvent<DataEvent.Type>
Type of event generated when new data is available from a data producer. It is immutable and carries data by reference.
Modifier and Type | Class and Description |
---|---|
static class |
DataEvent.Type
Possible event types for a DataEvent
|
Modifier and Type | Field and Description |
---|---|
protected DataBlock[] |
records
New data that triggered this event.
Multiple records can be associated to a single event because with high rate producers, it is often not practical to generate an event for every single record of measurements. |
relatedEntityID
Constructor and Description |
---|
DataEvent(long timeStamp,
IStreamingDataInterface dataInterface,
DataBlock... records)
Constructs a data event related to the default entity (i.e.
|
DataEvent(long timeStamp,
java.lang.String entityID,
IStreamingDataInterface dataInterface,
DataBlock... records)
Constructs a data event associated to an identifiable entity
|
Modifier and Type | Method and Description |
---|---|
DataComponent |
getRecordDescription() |
DataBlock[] |
getRecords() |
IStreamingDataInterface |
getSource()
Gets the source of the event as an object reference.
|
DataEvent.Type |
getType() |
getRelatedEntityID
getTimeStamp
protected DataBlock[] records
public DataEvent(long timeStamp, IStreamingDataInterface dataInterface, DataBlock... records)
timeStamp
- time of event generation (unix time in milliseconds, base 1970)dataInterface
- stream interface that generated the associated datarecords
- arrays of records that triggered this notificationpublic DataEvent(long timeStamp, java.lang.String entityID, IStreamingDataInterface dataInterface, DataBlock... records)
timeStamp
- time of event generation (unix time in milliseconds, base 1970)entityID
- Unique ID of entity that produced the data recordsdataInterface
- stream interface that generated the associated datarecords
- arrays of records that triggered this notificationpublic DataEvent.Type getType()
getType
in class Event<DataEvent.Type>
public IStreamingDataInterface getSource()
Event
getSource
in class Event<DataEvent.Type>
public DataComponent getRecordDescription()
public DataBlock[] getRecords()