public interface EventBusMetrics<H> extends Metrics
DISABLE_METRICS_PROPERTY_NAME, METRICS_ENABLED
Modifier and Type | Method and Description |
---|---|
default void |
discardMessage(H handler,
boolean local,
Message<?> msg)
Discard a message.
|
default H |
handlerRegistered(String address,
String repliedAddress)
Called when a handler is registered on the event bus.
No specific thread and context can be expected when this method is called.
|
default void |
handlerUnregistered(H handler)
Called when a handler has been unregistered from the event bus.
No specific thread and context can be expected when this method is called.
|
default void |
messageDelivered(H handler,
boolean local)
Called when an handler has been delivered a message.
|
default void |
messageRead(String address,
int numberOfBytes)
A message has been received from the network.
No specific thread and context can be expected when this method is called.
|
default void |
messageReceived(String address,
boolean publish,
boolean local,
int handlers)
Called when a message is received.
No specific thread and context can be expected when this method is called.
|
default void |
messageSent(String address,
boolean publish,
boolean local,
boolean remote)
Called when a message has been sent or published.
No specific thread and context can be expected when this method is called.
|
default void |
messageWritten(String address,
int numberOfBytes)
A message has been sent over the network.
No specific thread and context can be expected when this method is called.
|
default void |
replyFailure(String address,
ReplyFailure failure)
Called whenever the event bus delivers a reply failure to the sender/publisher, the
reply failure indicates the nature of the failure.
No specific thread and context can be expected when this method is called. |
default void |
scheduleMessage(H handler,
boolean local)
Schedule a message for processing.
No specific thread and context can be expected when this method is called.
|
default H handlerRegistered(String address, String repliedAddress)
address
- the address used to register the handlerrepliedAddress
- null when the handler is not a reply handler, otherwise the address this handler is replying todefault void handlerUnregistered(H handler)
handler
- the unregistered handlerdefault void scheduleMessage(H handler, boolean local)
handler
- the handler processing the messagelocal
- when the scheduled message is localdefault void discardMessage(H handler, boolean local, Message<?> msg)
handler
- the handler processing the messagelocal
- when the scheduled message is localmsg
- the discarded messagedefault void messageDelivered(H handler, boolean local)
handler
- the handler processing the messagelocal
- when the handled message is localdefault void messageSent(String address, boolean publish, boolean local, boolean remote)
address
- the addresspublish
- true when the message is publishedlocal
- the message is processed locallyremote
- the message is sent on the clusterdefault void messageReceived(String address, boolean publish, boolean local, int handlers)
address
- the addresspublish
- true when the message is publishedlocal
- true when the message is received locallyhandlers
- the number of handlers that process the messagedefault void messageWritten(String address, int numberOfBytes)
address
- the message addressnumberOfBytes
- the number of bytes writtendefault void messageRead(String address, int numberOfBytes)
address
- the message addressnumberOfBytes
- the number of bytes readdefault void replyFailure(String address, ReplyFailure failure)
reply failure
indicates the nature of the failure.
No specific thread and context can be expected when this method is called.address
- the addressfailure
- the ReplyFailure
Copyright © 2021 Eclipse. All rights reserved.