Package org.opensearch.tasks
Class TaskResourceUsage
java.lang.Object
org.opensearch.tasks.TaskResourceUsage
- All Implemented Interfaces:
Writeable
,org.opensearch.common.xcontent.ToXContent
,org.opensearch.common.xcontent.ToXContentFragment
public class TaskResourceUsage
extends Object
implements Writeable, org.opensearch.common.xcontent.ToXContentFragment
Task resource usage information
Writeable TaskResourceUsage objects are used to represent resource usage information of running tasks.
- Opensearch.internal:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.common.xcontent.ToXContent
org.opensearch.common.xcontent.ToXContent.DelegatingMapParams, org.opensearch.common.xcontent.ToXContent.MapParams, org.opensearch.common.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.opensearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.opensearch.common.xcontent.ConstructingObjectParser<TaskResourceUsage,
Void> Fields inherited from interface org.opensearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
static TaskResourceUsage
fromXContent
(org.opensearch.common.xcontent.XContentParser parser) long
long
int
hashCode()
static TaskResourceUsage
Read from a stream.toString()
org.opensearch.common.xcontent.XContentBuilder
toXContent
(org.opensearch.common.xcontent.XContentBuilder builder, org.opensearch.common.xcontent.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.opensearch.common.xcontent.ToXContentFragment
isFragment
-
Field Details
-
PARSER
public static final org.opensearch.common.xcontent.ConstructingObjectParser<TaskResourceUsage,Void> PARSER
-
-
Constructor Details
-
TaskResourceUsage
public TaskResourceUsage(long cpuTimeInNanos, long memoryInBytes)
-
-
Method Details
-
readFromStream
Read from a stream.- Throws:
IOException
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
getCpuTimeInNanos
public long getCpuTimeInNanos() -
getMemoryInBytes
public long getMemoryInBytes() -
toXContent
public org.opensearch.common.xcontent.XContentBuilder toXContent(org.opensearch.common.xcontent.XContentBuilder builder, org.opensearch.common.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.opensearch.common.xcontent.ToXContent
- Throws:
IOException
-
fromXContent
-
toString
-
equals
-
hashCode
public int hashCode()
-