Module org.elasticsearch.server
Package org.elasticsearch.transport
Record Class TransportActionStats
java.lang.Object
java.lang.Record
org.elasticsearch.transport.TransportActionStats
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentObject
public record TransportActionStats(long requestCount, long totalRequestSize, long[] requestSizeHistogram, long responseCount, long totalResponseSize, long[] responseSizeHistogram)
extends Record
implements Writeable, ToXContentObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionTransportActionStats
(long requestCount, long totalRequestSize, long[] requestSizeHistogram, long responseCount, long totalResponseSize, long[] responseSizeHistogram) Creates an instance of aTransportActionStats
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.long
Returns the value of therequestCount
record component.long[]
Returns the value of therequestSizeHistogram
record component.long
Returns the value of theresponseCount
record component.long[]
Returns the value of theresponseSizeHistogram
record component.final String
toString()
Returns a string representation of this record class.long
Returns the value of thetotalRequestSize
record component.long
Returns the value of thetotalResponseSize
record component.toXContent
(XContentBuilder builder, ToXContent.Params params) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
TransportActionStats
- Throws:
IOException
-
TransportActionStats
public TransportActionStats(long requestCount, long totalRequestSize, long[] requestSizeHistogram, long responseCount, long totalResponseSize, long[] responseSizeHistogram) Creates an instance of aTransportActionStats
record class.- Parameters:
requestCount
- the value for therequestCount
record componenttotalRequestSize
- the value for thetotalRequestSize
record componentrequestSizeHistogram
- the value for therequestSizeHistogram
record componentresponseCount
- the value for theresponseCount
record componenttotalResponseSize
- the value for thetotalResponseSize
record componentresponseSizeHistogram
- the value for theresponseSizeHistogram
record component
-
-
Method Details
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
requestCount
public long requestCount()Returns the value of therequestCount
record component.- Returns:
- the value of the
requestCount
record component
-
totalRequestSize
public long totalRequestSize()Returns the value of thetotalRequestSize
record component.- Returns:
- the value of the
totalRequestSize
record component
-
requestSizeHistogram
public long[] requestSizeHistogram()Returns the value of therequestSizeHistogram
record component.- Returns:
- the value of the
requestSizeHistogram
record component
-
responseCount
public long responseCount()Returns the value of theresponseCount
record component.- Returns:
- the value of the
responseCount
record component
-
totalResponseSize
public long totalResponseSize()Returns the value of thetotalResponseSize
record component.- Returns:
- the value of the
totalResponseSize
record component
-
responseSizeHistogram
public long[] responseSizeHistogram()Returns the value of theresponseSizeHistogram
record component.- Returns:
- the value of the
responseSizeHistogram
record component
-