protected class DummyVertxMetrics.DummyEventBusMetrics extends Object implements EventBusMetrics<Void>
Modifier | Constructor and Description |
---|---|
protected |
DummyEventBusMetrics() |
Modifier and Type | Method and Description |
---|---|
void |
beginHandleMessage(Void handler,
boolean local)
Called when an handler begin to process a message.
The thread model depends on the actual context thats registered the handler.
|
void |
close()
Used to close out the metrics, for example when an http server/client has been closed.
No specific thread and context can be expected when this method is called.
|
void |
endHandleMessage(Void handler,
Throwable failure)
Called when an handler finish to process a message.
The thread model depends on the actual context thats registered the handler.
|
Void |
handlerRegistered(String address,
boolean replyHandler)
Called when a handler is registered on the event bus.
No specific thread and context can be expected when this method is called.
|
void |
handlerUnregistered(Void 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.
|
boolean |
isEnabled()
Whether the metrics are enabled.
|
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.
|
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.
|
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.
|
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.
|
void |
replyFailure(String address,
ReplyFailure failure)
Called whenever there is a reply failure on the event bus.
No specific thread and context can be expected when this method is called.
|
public void messageWritten(String address, int numberOfBytes)
EventBusMetrics
messageWritten
in interface EventBusMetrics<Void>
address
- the message addressnumberOfBytes
- the number of bytes writtenpublic void messageRead(String address, int numberOfBytes)
EventBusMetrics
messageRead
in interface EventBusMetrics<Void>
address
- the message addressnumberOfBytes
- the number of bytes readpublic Void handlerRegistered(String address, boolean replyHandler)
EventBusMetrics
handlerRegistered
in interface EventBusMetrics<Void>
address
- the address used to register the handlerreplyHandler
- true when the handler is a reply handlerpublic void handlerUnregistered(Void handler)
EventBusMetrics
handlerUnregistered
in interface EventBusMetrics<Void>
handler
- the unregistered handlerpublic void beginHandleMessage(Void handler, boolean local)
EventBusMetrics
beginHandleMessage
in interface EventBusMetrics<Void>
handler
- the handler processing the messagelocal
- when the received message is localpublic void endHandleMessage(Void handler, Throwable failure)
EventBusMetrics
endHandleMessage
in interface EventBusMetrics<Void>
handler
- the handler processing the messagefailure
- an optional failure thrown by handlerpublic void messageSent(String address, boolean publish, boolean local, boolean remote)
EventBusMetrics
messageSent
in interface EventBusMetrics<Void>
address
- the addresspublish
- true when the message is publishedlocal
- the message is processed locallyremote
- the message is sent on the clusterpublic void messageReceived(String address, boolean publish, boolean local, int handlers)
EventBusMetrics
messageReceived
in interface EventBusMetrics<Void>
address
- the addresspublish
- true when the message is publishedlocal
- true when the message is received locallyhandlers
- the number of handlers that process the messagepublic void replyFailure(String address, ReplyFailure failure)
EventBusMetrics
replyFailure
in interface EventBusMetrics<Void>
address
- the addressfailure
- the ReplyFailure
public boolean isEnabled()
Metrics
Copyright © 2015. All Rights Reserved.