Class ClearScrollResponse

All Implemented Interfaces:
Writeable, StatusToXContentObject, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject, org.elasticsearch.core.RefCounted
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.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      IOException
    • fromXContent

      public static ClosePointInTimeResponse fromXContent(org.elasticsearch.common.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