StreamEvent

StreamEvent enables flexible, efficient event-driven data processing in Joule

Learn what it is

StreamEvent object

Package location

com.fractalworks.streams.core.data.streams.

DSL attributes

Attribute
Description
Type

uuid

Unique identifier assigned by the platform to enable tracking

UUID

type

Parent type of the event e.g. market_data

String

subType

Finer grain type of the event e.g. aim

Object

eventTme

Actual time the event occurred within the source system. This is set by the user

Long

IngestTime

Actual time the event was ingested by Joule process. This is automatically assigned at point of object creation

Long

dictionary

Store of all key event attributes

Map<String,Object>

callChain

Tracking store of every change made to the event as it passes through the processing pipeline. This is managed by the Joule platform

Map<Tuple<UUID, String>, Long>

Key methods

Adding

Two methods are provided to add new attributes to an event. If a null value is passed, it will be converted to a String null value.

// Add field and value using the default UUID
public void addValue(String field, Object value);

// Add field and value using the passed UUID
public void addValue(UUID srcUUID, String field, Object value);

Updating

Attributes can be updated in place. If a null value is passed, it will be converted to a String null value.

// Update field and value using the passed UUID
public void replaceValue(UUID srcUUID, String field, Object value);

Get value

Retrieve either a single attribute or the entire set of attribute values.

// Get value for field
public Object getValue(String field);

// Get a shallow copy of the field value dictionary
public Map<String, Object> getDictionary();

Remove

Two methods are available to remove fields from the event.

// Remove a single field from the event
public void removeValue(UUID srcUUID, String field);

// Remove all stored field data
public void removeAll();

Cloning

A deep copy method is provided to create a new StreamEvent from the current one, preserving data isolation.

// Get a deep copy of this eventfav
public StreamEvent deepCopy();

Get call chain

Retrieve the history of changes applied to the event, providing insight into its modification history.

// Get the history of changes applied to the event
public Map<Triple<UUID, String,Object>, Long> getCallChain();

Last updated