Class TaskResourceUsage
java.lang.Object
org.opensearch.core.tasks.resourcetracker.TaskResourceUsage
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentFragment
@PublicApi(since="2.1.0")
public class TaskResourceUsage
extends Object
implements Writeable, ToXContentFragment
Task resource usage information
Writeable TaskResourceUsage objects are used to represent resource usage information of running tasks.
- Opensearch.api:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.WriteableRegistry, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic TaskResourceUsagefromXContent(XContentParser parser) longlonginthashCode()static TaskResourceUsageRead from a stream.toString()toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensearch.core.xcontent.ToXContentFragment
isFragment
-
Field Details
-
PARSER
-
-
Constructor Details
-
TaskResourceUsage
public TaskResourceUsage(long cpuTimeInNanos, long memoryInBytes)
-
-
Method Details
-
readFromStream
Read from a stream.- Throws:
IOException
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
getCpuTimeInNanos
public long getCpuTimeInNanos() -
getMemoryInBytes
public long getMemoryInBytes() -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
fromXContent
-
toString
-
equals
-
hashCode
public int hashCode()
-