Interface EventSources
-
public interface EventSourcesProvides various ways to getTransformableEventStream.- Since:
- 2023.1.0
- Author:
- Sara Pellegrini
-
-
Method Summary
Static Methods Modifier and Type Method Description static TransformableEventStreamfromIterable(Iterable<EventWithToken> events)Creates aTransformableEventStreambased on theIterableof events.static TransformableEventStreamrange(Supplier<EventChannel> eventChannelSupplier, long first, long last)Creates aTransformableEventStreambased on theeventChannelSupplierandfirstandlastevent tokens.
-
-
-
Method Detail
-
fromIterable
static TransformableEventStream fromIterable(Iterable<EventWithToken> events)
Creates aTransformableEventStreambased on theIterableof events.- Parameters:
events-Iterableof events- Returns:
TransformableEventStream
-
range
static TransformableEventStream range(Supplier<EventChannel> eventChannelSupplier, long first, long last)
Creates aTransformableEventStreambased on theeventChannelSupplierandfirstandlastevent tokens.- Parameters:
eventChannelSupplier- supplies theEventChannelfirst- the first token to be included in the stream, should be -1 to start from the beginninglast- the last token to be included in the stream- Returns:
TransformableEventStream
-
-