public final class ObservedDeserializationDuration extends Base
Modifier and Type | Field and Description |
---|---|
protected Long |
durationInMilliseconds |
protected SphereRequest<?> |
request |
protected String |
requestId |
Modifier and Type | Method and Description |
---|---|
String |
getCorrelationId() |
Long |
getDurationInMilliseconds()
The duration in milliseconds.
|
HttpResponse |
getHttpResponse() |
SphereRequest<?> |
getRequest()
The sphere request related to the observed duration.
|
String |
getRequestId()
The
SimpleMetricsSphereClient adds a request ID to each SphereRequest , so that ObservedDuration s belonging to the same request can be associated.. |
Object |
getResult() |
String |
getTopic()
A String to describe the topic associated with the observed duration (e.g.
|
static ObservedDeserializationDuration |
of(long durationInMilliseconds,
String sphereRequestId,
SphereRequest<?> request,
String correlationId) |
static ObservedDeserializationDuration |
of(long durationInMilliseconds,
String sphereRequestId,
SphereRequest<?> request,
String correlationId,
HttpResponse httpResponse,
Object result) |
protected final String requestId
protected final Long durationInMilliseconds
protected final SphereRequest<?> request
public static ObservedDeserializationDuration of(long durationInMilliseconds, String sphereRequestId, SphereRequest<?> request, @Nullable String correlationId)
public static ObservedDeserializationDuration of(long durationInMilliseconds, String sphereRequestId, SphereRequest<?> request, @Nullable String correlationId, @Nullable HttpResponse httpResponse, @Nullable Object result)
@Nullable public HttpResponse getHttpResponse()
public Long getDurationInMilliseconds()
ObservedDuration
getDurationInMilliseconds
in interface ObservedDuration
public String getRequestId()
ObservedDuration
SimpleMetricsSphereClient
adds a request ID to each SphereRequest
, so that ObservedDuration
s belonging to the same request can be associated..
This is necessary since a SphereRequest
can be reused for multiple requests.
getRequestId
in interface ObservedDuration
public SphereRequest<?> getRequest()
ObservedDuration
getRequest
in interface ObservedDuration
public final String getTopic()
ObservedDuration
getTopic
in interface ObservedDuration