Module org.elasticsearch.compute
Record Class DriverSleeps
java.lang.Object
java.lang.Record
org.elasticsearch.compute.operator.DriverSleeps
- Record Components:
counts- map from the reason the driver has slept to the number of times it slept for that reasonfirst- the first few times the driver sleptlast- the last few times the driver slept
- All Implemented Interfaces:
Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public record DriverSleeps(Map<String,Long> counts, List<DriverSleeps.Sleep> first, List<DriverSleeps.Sleep> last)
extends Record
implements Writeable, org.elasticsearch.xcontent.ToXContentObject
Records of the times the driver has slept.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA record of a time the driver slept.Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested 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
ConstructorsConstructorDescriptionDriverSleeps(Map<String, Long> counts, List<DriverSleeps.Sleep> first, List<DriverSleeps.Sleep> last) Creates an instance of aDriverSleepsrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncounts()Returns the value of thecountsrecord component.static DriverSleepsempty()final booleanIndicates whether some other object is "equal to" this one.first()Returns the value of thefirstrecord component.final inthashCode()Returns a hash code value for this object.last()Returns the value of thelastrecord component.static DriverSleepsread(StreamInput in) Record a sleep.final StringtoString()Returns a string representation of this record class.org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) wake(long now) Record a wake.voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
DriverSleeps
public DriverSleeps(Map<String, Long> counts, List<DriverSleeps.Sleep> first, List<DriverSleeps.Sleep> last) Creates an instance of aDriverSleepsrecord class.
-
-
Method Details
-
read
- Throws:
IOException
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
empty
-
sleep
Record a sleep.- Parameters:
reason- the reason for the sleepnow- the current time
-
wake
Record a wake.- Parameters:
now- the current time
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- 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. All components in this record class are compared withObjects::equals(Object,Object). -
counts
Returns the value of thecountsrecord component.- Returns:
- the value of the
countsrecord component
-
first
Returns the value of thefirstrecord component.- Returns:
- the value of the
firstrecord component
-
last
Returns the value of thelastrecord component.- Returns:
- the value of the
lastrecord component
-