Class ClearScrollResponse

java.lang.Object
org.opensearch.core.transport.TransportMessage
org.opensearch.core.transport.TransportResponse
org.opensearch.core.action.ActionResponse
org.opensearch.action.search.ClearScrollResponse
All Implemented Interfaces:
StatusToXContentObject, org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContent, org.opensearch.core.xcontent.ToXContentObject

@PublicApi(since="1.0.0") public class ClearScrollResponse extends org.opensearch.core.action.ActionResponse implements StatusToXContentObject
Transport response for clearing a search scroll
Opensearch.api:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.opensearch.core.transport.TransportResponse

    org.opensearch.core.transport.TransportResponse.Empty

    Nested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent

    org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params

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

    org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V>
  • Field Summary

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

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
    ClearScrollResponse(boolean succeeded, int numFreed)
     
    ClearScrollResponse(org.opensearch.core.common.io.stream.StreamInput in)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    fromXContent(org.opensearch.core.xcontent.XContentParser parser)
    Parse the clear scroll response body into a new ClearScrollResponse object
    int
     
    boolean
     
    org.opensearch.core.rest.RestStatus
    Returns the REST status to make sure it is returned correctly
    org.opensearch.core.xcontent.XContentBuilder
    toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params)
     
    void
    writeTo(org.opensearch.core.common.io.stream.StreamOutput out)
     

    Methods inherited from class org.opensearch.core.transport.TransportMessage

    remoteAddress, remoteAddress

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.opensearch.core.xcontent.ToXContentObject

    isFragment
  • Constructor Details

    • ClearScrollResponse

      public ClearScrollResponse(boolean succeeded, int numFreed)
    • ClearScrollResponse

      public ClearScrollResponse(org.opensearch.core.common.io.stream.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 org.opensearch.core.rest.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.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.opensearch.core.xcontent.ToXContent
      Throws:
      IOException
    • fromXContent

      public static ClearScrollResponse fromXContent(org.opensearch.core.xcontent.XContentParser parser) throws IOException
      Parse the clear scroll response body into a new ClearScrollResponse object
      Throws:
      IOException
    • writeTo

      public void writeTo(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.Writeable
      Throws:
      IOException