Object -
streams :
StreamEvent
The StreamEvent
object is a wrapper around the actual data being received to the input stream. If a record is
receive to a input stream, that record is converted to a map of anydata values and set that map to a field called
data
in a new StreamEvent
object. StreamEvent
is only used internally to transmit event data from one
processor to another processor. At the time the record is converted to a map, the timestamp is set. If the record
is first received by the input stream, the eventType is set to streams:CURRENT. Other than stream events of type
streams:CURRENT, there are 3 types of StreamEvents. They are streams:EXPIRED, streams:RESET, streams:TIMER. An expired
event is used to remove the state of its respective current event. A reset event is used to completely wipe the
state and a timer event is used to trigger the process
method of a particular processor in timely manner.
Constructor
__init
([string, map] | [string, map] | map eventData, EventType eventType, int timestamp)
Methods
Returns a copy of the stream event instance.
Adds key values pairs in a given map to the field data
.
Adds an attribute of an event to the map with its value.
Returns the value of an attribute.
Returns the name of the stream.
Returns the id of the event.
Returns a clone of the event data.
Returns a clone of the event data map.
Copy values of a given dataMap
into the self.data
field.
Copy values of a given data
into the self.dataMap
field.
Fields
Returns a copy of the stream event instance.
-
Return Type
(StreamEvent) A copy of the
StreamEvent
object with its state.
Adds key values pairs in a given map to the field data
.
Parameters
- eventData map
-
map of anydata values to be added to field
data
.
Adds an attribute of an event to the map with its value.
Returns the value of an attribute.
Parameters
- path string
-
the path
-
Return Type
(anydata) the attribute value.
Returns the name of the stream.
-
Return Type
(string) the stream name.
Returns a clone of the event data.
-
Return Type
(map) clone of the event data.
Returns a clone of the event data map.
-
Return Type
(map) clone of the event data map.
Copy values of a given dataMap
into the self.data
field.
Parameters
- dataMap map
-
map containg event attribute values.
Copy values of a given data
into the self.dataMap
field.
Parameters
- data map
-
map containg event attribute values.