@ThreadSafe
public class MessageTrace
extends java.lang.Object
Each time an element is added to a full message store, the message store automatically removes its head element.
| Constructor and Description |
|---|
MessageTrace(int capacity,
java.lang.Iterable<de.otto.synapse.endpoint.MessageEndpoint> endpoints)
Creates a new instance with specified capacity.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(TraceEntry traceEntry)
Adds a Message to the MessageStore.
|
java.util.List<java.lang.String> |
getReceiverChannels() |
java.util.List<java.lang.String> |
getSenderChannels() |
java.util.stream.Stream<TraceEntry> |
stream()
Returns a Stream of
traceEntries contained in the RegisteredEndpoints. |
java.util.stream.Stream<TraceEntry> |
stream(java.lang.String channelName,
de.otto.synapse.endpoint.EndpointType endpointType) |
public MessageTrace(int capacity,
java.lang.Iterable<de.otto.synapse.endpoint.MessageEndpoint> endpoints)
capacity - the size of the underlying ring buffer.public java.util.List<java.lang.String> getSenderChannels()
public java.util.List<java.lang.String> getReceiverChannels()
public void add(TraceEntry traceEntry)
If the capacity of the ring buffer is reached, the oldest message is removed
traceEntry - the message to addpublic java.util.stream.Stream<TraceEntry> stream()
traceEntries contained in the RegisteredEndpoints.
The stream will maintain the insertion order of the traceEntries.
public java.util.stream.Stream<TraceEntry> stream(java.lang.String channelName, de.otto.synapse.endpoint.EndpointType endpointType)