public class BufferedEventStream extends AbstractBufferedStream<EventWithToken,GetEventsRequest> implements EventStream
EventStream used for Event processing.| Constructor and Description |
|---|
BufferedEventStream(ClientIdentification clientId,
long trackingToken,
int bufferSize,
int refillBatch,
boolean forceReadFromLeader)
|
| Modifier and Type | Method and Description |
|---|---|
protected GetEventsRequest |
buildFlowControlMessage(FlowControl flowControl)
Build a flow control message of type
OUT based on the given flowControl. |
protected GetEventsRequest |
buildInitialFlowControlMessage(FlowControl flowControl)
Builds the initial flow control message of type
OUT based on the given flowControl. |
void |
excludePayloadType(String payloadType,
String revision)
Instructs AxonServer to not send messages with the given
payloadType and revision. |
protected EventWithToken |
terminalMessage()
Builds a terminal message of type
T specifying when the this stream is closed. |
close, getError, isClosed, next, nextIfAvailable, nextIfAvailable, onAvailable, onCloseRequested, onCompleted, onError, onNext, peekbeforeStart, getErrorResult, take, tryTake, tryTake, tryTake, tryTakeNowenableFlowControl, markConsumed, outboundStreamclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getError, isClosed, next, nextIfAvailable, nextIfAvailable, onAvailable, peekpublic BufferedEventStream(ClientIdentification clientId, long trackingToken, int bufferSize, int refillBatch, boolean forceReadFromLeader)
clientId - The client identifier starting this stream.trackingToken - The position to start this BufferedEventStream at.bufferSize - The buffer size of this event stream.refillBatch - The number of Events to consume prior refilling the buffer.forceReadFromLeader - A boolean defining whether Events must be read from the leader.protected GetEventsRequest buildFlowControlMessage(FlowControl flowControl)
FlowControlledStreamOUT based on the given flowControl.buildFlowControlMessage in class FlowControlledStream<EventWithToken,GetEventsRequest>flowControl - the FlowControl message used to base this implementation's flow control message onINprotected GetEventsRequest buildInitialFlowControlMessage(FlowControl flowControl)
FlowControlledStreamOUT based on the given flowControl.buildInitialFlowControlMessage in class FlowControlledStream<EventWithToken,GetEventsRequest>flowControl - the FlowControl message used to base this implementation's flow control message onINprotected EventWithToken terminalMessage()
FlowControlledBufferT specifying when the this stream is closed.terminalMessage in class FlowControlledBuffer<EventWithToken,GetEventsRequest>T specifying when the this stream is closedpublic void excludePayloadType(String payloadType, String revision)
EventStreampayloadType and revision. This
method is in no way a guarantee that these message will no longer be sent at all. Some messages may already have
been en-route, and AxonServer may decide to send messages every once in a while as a "beacon" to relay progress
of the tracking token. It may choose, however, to omit the actual payload, in that case.excludePayloadType in interface EventStreampayloadType - the type of payload to exclude from the streamrevision - the revision of the payload to exclude from the streamCopyright © 2020–2023 AxonIQ BV. All rights reserved.