Class TaskId

java.lang.Object
org.elasticsearch.tasks.TaskId
All Implemented Interfaces:
Writeable

public final class TaskId
extends java.lang.Object
implements Writeable
Task id that consists of node id and id of the task on the node
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

    Writeable.Reader<V>, Writeable.Writer<V>
  • Field Summary

    Fields
    Modifier and Type Field Description
    static TaskId EMPTY_TASK_ID  
  • Constructor Summary

    Constructors
    Constructor Description
    TaskId​(java.lang.String taskId)  
    TaskId​(java.lang.String nodeId, long id)  
  • Method Summary

    Modifier and Type Method Description
    boolean equals​(java.lang.Object o)  
    long getId()  
    java.lang.String getNodeId()  
    int hashCode()  
    boolean isSet()  
    static org.elasticsearch.common.xcontent.ContextParser<java.lang.Void,​TaskId> parser()  
    static TaskId readFromStream​(StreamInput in)
    Read a TaskId from a stream.
    java.lang.String toString()  
    void writeTo​(StreamOutput out)
    Write this into the StreamOutput.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • EMPTY_TASK_ID

      public static final TaskId EMPTY_TASK_ID
  • Constructor Details

    • TaskId

      public TaskId​(java.lang.String nodeId, long id)
    • TaskId

      public TaskId​(java.lang.String taskId)
  • Method Details

    • readFromStream

      public static TaskId readFromStream​(StreamInput in) throws java.io.IOException
      Read a TaskId from a stream. TaskId has this rather than the usual constructor that takes a StreamInput so we can return the EMPTY_TASK_ID without allocating.
      Throws:
      java.io.IOException
    • writeTo

      public void writeTo​(StreamOutput out) throws java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      java.io.IOException
    • parser

      public static org.elasticsearch.common.xcontent.ContextParser<java.lang.Void,​TaskId> parser()
    • getNodeId

      public java.lang.String getNodeId()
    • getId

      public long getId()
    • isSet

      public boolean isSet()
    • toString

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

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object