Class LastSourceEventCache
java.lang.Object
com.inductiveautomation.eventstream.gateway.util.LastSourceEventCache
Retains the last event each Event Stream's Source emitted, so a preview or a
LAST_EVENT Source
can replay it. Used for testing with last event.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable EventPayloadReturns the latest value recorded forkey, ornullif nothing has been recorded for that Event Stream yet.voidsetLastValue(EventStreamKey key, EventPayload value) Set the last value for the given key.
-
Constructor Details
-
LastSourceEventCache
public LastSourceEventCache()
-
-
Method Details
-
setLastValue
Set the last value for the given key.- Parameters:
key- EventStream key where the value came from.value- Value as it'd be emitted by Source.
-
getLastValue
Returns the latest value recorded forkey, ornullif nothing has been recorded for that Event Stream yet.- Parameters:
key- the Event Stream to look up.- Returns:
- the last recorded value, or
nullif there is none.
-