Package org.opensearch.action.search
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
ConstructorsConstructorDescriptionClearScrollResponse
(boolean succeeded, int numFreed) ClearScrollResponse
(org.opensearch.core.common.io.stream.StreamInput in) -
Method Summary
Modifier and TypeMethodDescriptionstatic ClearScrollResponse
fromXContent
(org.opensearch.core.xcontent.XContentParser parser) Parse the clear scroll response body into a newClearScrollResponse
objectint
boolean
org.opensearch.core.rest.RestStatus
status()
Returns the REST status to make sure it is returned correctlyorg.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
- 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 interfaceStatusToXContentObject
-
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 interfaceorg.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 newClearScrollResponse
object- Throws:
IOException
-
writeTo
- Specified by:
writeTo
in interfaceorg.opensearch.core.common.io.stream.Writeable
- Throws:
IOException
-