public interface RequestStatistics
The
RequestStatistics
interface defines statistic values about request processing.- Since:
- 2.4.3
- Author:
- Frank Fock
-
Method Summary
Modifier and TypeMethodDescriptionint
Gets the index of the message that has been responded.long
Gets the time elapsed between the sending of the message and receiving its response.int
Gets the total number of messages that have been sent on behalf of this request.void
setIndexOfMessageResponded
(int indexOfMessageResponded) Sets the index of the message that has been responded.void
setResponseRuntimeNanos
(long responseRuntimeNanos) Sets the time elapsed between the sending of the message and receiving its response.void
setTotalMessagesSent
(int totalMessagesSent) Sets the total number of messages that have been sent on behalf of this request.
-
Method Details
-
getTotalMessagesSent
int getTotalMessagesSent()Gets the total number of messages that have been sent on behalf of this request.- Returns:
- the number of messages sent (number of retries plus one).
-
setTotalMessagesSent
void setTotalMessagesSent(int totalMessagesSent) Sets the total number of messages that have been sent on behalf of this request.- Parameters:
totalMessagesSent
- the total message count for this request.
-
getIndexOfMessageResponded
int getIndexOfMessageResponded()Gets the index of the message that has been responded.- Returns:
- 0 if the initial message has been responded by the command responder. A value greater than zero indicates, that a retry message has been responded.
-
setIndexOfMessageResponded
void setIndexOfMessageResponded(int indexOfMessageResponded) Sets the index of the message that has been responded.- Parameters:
indexOfMessageResponded
- the zero-based index of the message for which the response had been received.
-
getResponseRuntimeNanos
long getResponseRuntimeNanos()Gets the time elapsed between the sending of the message and receiving its response.- Returns:
- the runtime of the successful request and response message pair in nanoseconds.
-
setResponseRuntimeNanos
void setResponseRuntimeNanos(long responseRuntimeNanos) Sets the time elapsed between the sending of the message and receiving its response.- Parameters:
responseRuntimeNanos
- the runtime of the successful request and response message pair in nanoseconds.
-