public class DefaultEventSource extends AbstractEventSource
| Constructor and Description |
|---|
DefaultEventSource(MessageStore messageStore,
MessageLogReceiverEndpoint messageLog) |
DefaultEventSource(MessageStore messageStore,
MessageLogReceiverEndpoint messageLog,
org.slf4j.Marker marker) |
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.CompletableFuture<ChannelPosition> |
consumeUntil(java.util.function.Predicate<ShardResponse> stopCondition)
Consumes all messages from the EventSource until the predicate returns true.
|
getChannelName, getMessageDispatcher, getMessageLogReceiverEndpoint, isStopping, register, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconsumepublic DefaultEventSource(@Nonnull
MessageStore messageStore,
@Nonnull
MessageLogReceiverEndpoint messageLog)
public DefaultEventSource(@Nonnull
MessageStore messageStore,
@Nonnull
MessageLogReceiverEndpoint messageLog,
@Nonnull
org.slf4j.Marker marker)
@Nonnull public java.util.concurrent.CompletableFuture<ChannelPosition> consumeUntil(@Nonnull java.util.function.Predicate<ShardResponse> stopCondition)
EventSource
The registered consumers will be called zero or more times, depending on
the number of messages retrieved from the EventSource.
stopCondition - the stop condition used to determine whether or not message-consumption should stop