Class ClearScrollResponse

All Implemented Interfaces:
Writeable, StatusToXContentObject, org.elasticsearch.core.RefCounted, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject
Direct Known Subclasses:
ClosePointInTimeResponse

public class ClearScrollResponse extends ActionResponse implements StatusToXContentObject
  • Constructor Details

    • ClearScrollResponse

      public ClearScrollResponse(boolean succeeded, int numFreed)
    • ClearScrollResponse

      public ClearScrollResponse(StreamInput in) throws IOException
      Throws:
      IOException
  • Method Details

    • isSucceeded

      public boolean isSucceeded()
      Returns:
      Whether the attempt to clear a scroll was successful.
    • getNumFreed

      public int getNumFreed()
      Returns:
      The number of search contexts that were freed. If this is 0 the assumption can be made, that the scroll id specified in the request did not exist. (never existed, was expired, or completely consumed)
    • status

      public RestStatus status()
      Description copied from interface: StatusToXContentObject
      Returns the REST status to make sure it is returned correctly
      Specified by:
      status in interface StatusToXContentObject
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException
    • fromXContent

      public static ClosePointInTimeResponse fromXContent(org.elasticsearch.xcontent.XContentParser parser) throws IOException
      Parse the clear scroll response body into a new ClearScrollResponse object
      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