public class EventBuffer extends Object implements org.axonframework.eventhandling.TrackingEventStream
This class is intended for internal use. Be cautious.
| Constructor and Description |
|---|
EventBuffer(io.axoniq.axonserver.connector.event.EventStream delegate,
org.axonframework.serialization.upcasting.event.EventUpcaster upcasterChain,
org.axonframework.serialization.Serializer serializer,
boolean disableEventBlacklisting)
Initializes an Event Buffer, passing messages through given
upcasterChain and deserializing events using
given serializer. |
| Modifier and Type | Method and Description |
|---|---|
void |
blacklist(org.axonframework.eventhandling.TrackedEventMessage<?> trackedEventMessage)
----
|
void |
close() |
boolean |
hasNextAvailable(int timeout,
TimeUnit timeUnit) |
org.axonframework.eventhandling.TrackedEventMessage<?> |
nextAvailable() |
Optional<org.axonframework.eventhandling.TrackedEventMessage<?>> |
peek() |
public EventBuffer(io.axoniq.axonserver.connector.event.EventStream delegate,
org.axonframework.serialization.upcasting.event.EventUpcaster upcasterChain,
org.axonframework.serialization.Serializer serializer,
boolean disableEventBlacklisting)
upcasterChain and deserializing events using
given serializer.delegate - the EventStream to delegate operations toupcasterChain - the upcasterChain to translate serialized representations before deserializingserializer - the serializer capable of deserializing incoming messagesdisableEventBlacklisting - specifying whether events should or should not be included in the bufferpublic void blacklist(org.axonframework.eventhandling.TrackedEventMessage<?> trackedEventMessage)
This implementation removes events from the stream based on the payload type of the given message.
blacklist in interface org.axonframework.common.stream.BlockingStream<org.axonframework.eventhandling.TrackedEventMessage<?>>public Optional<org.axonframework.eventhandling.TrackedEventMessage<?>> peek()
peek in interface org.axonframework.common.stream.BlockingStream<org.axonframework.eventhandling.TrackedEventMessage<?>>public boolean hasNextAvailable(int timeout,
TimeUnit timeUnit)
hasNextAvailable in interface org.axonframework.common.stream.BlockingStream<org.axonframework.eventhandling.TrackedEventMessage<?>>public org.axonframework.eventhandling.TrackedEventMessage<?> nextAvailable()
nextAvailable in interface org.axonframework.common.stream.BlockingStream<org.axonframework.eventhandling.TrackedEventMessage<?>>public void close()
close in interface AutoCloseableclose in interface org.axonframework.common.stream.BlockingStream<org.axonframework.eventhandling.TrackedEventMessage<?>>Copyright © 2010–2021. All rights reserved.