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

    Fields
    Modifier and Type
    Field
    Description
    static final org.opensearch.common.xcontent.ConstructingObjectParser<TaskResourceUsage,Void>
     

    Fields inherited from interface org.opensearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
    TaskResourceUsage(long cpuTimeInNanos, long memoryInBytes)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    fromXContent(org.opensearch.common.xcontent.XContentParser parser)
     
    long
     
    long
     
    int
     
    Read from a stream.
     
    org.opensearch.common.xcontent.XContentBuilder
    toXContent(org.opensearch.common.xcontent.XContentBuilder builder, org.opensearch.common.xcontent.ToXContent.Params params)
     
    void
    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

      public static TaskResourceUsage readFromStream(StreamInput in) throws IOException
      Read from a stream.
      Throws:
      IOException
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      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 interface org.opensearch.common.xcontent.ToXContent
      Throws:
      IOException
    • fromXContent

      public static TaskResourceUsage fromXContent(org.opensearch.common.xcontent.XContentParser parser)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object