Class AcknowledgedResponse
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportResponse
org.elasticsearch.action.ActionResponse
org.elasticsearch.action.support.master.AcknowledgedResponse
- All Implemented Interfaces:
Writeable,RefCounted,ToXContent,ToXContentObject
- Direct Known Subclasses:
ClusterRerouteResponse,ClusterUpdateSettingsResponse,ShardsAcknowledgedResponse
A response that indicates that a request has been acknowledged
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.action.ActionResponse
ActionResponse.EmptyNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanstatic final AcknowledgedResponsestatic final AcknowledgedResponseFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAcknowledgedResponse(boolean acknowledged) protectedAcknowledgedResponse(StreamInput in, boolean readAcknowledged) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddCustomFields(XContentBuilder builder, ToXContent.Params params) protected static <T extends AcknowledgedResponse>
voiddeclareAcknowledgedField(ConstructingObjectParser<T, Void> objectParser) booleanstatic AcknowledgedResponsefromXContent(XContentParser parser) inthashCode()final booleanReturns whether the response is acknowledged or notstatic AcknowledgedResponseof(boolean acknowledged) static AcknowledgedResponsereadFrom(StreamInput in) final XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
TRUE
-
FALSE
-
acknowledged
protected boolean acknowledged
-
-
Constructor Details
-
AcknowledgedResponse
- Throws:
IOException
-
AcknowledgedResponse
- Throws:
IOException
-
AcknowledgedResponse
protected AcknowledgedResponse(boolean acknowledged)
-
-
Method Details
-
declareAcknowledgedField
protected static <T extends AcknowledgedResponse> void declareAcknowledgedField(ConstructingObjectParser<T, Void> objectParser) -
readFrom
- Throws:
IOException
-
of
-
isAcknowledged
public final boolean isAcknowledged()Returns whether the response is acknowledged or not- Returns:
- true if the response is acknowledged, false otherwise
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public final XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
addCustomFields
protected void addCustomFields(XContentBuilder builder, ToXContent.Params params) throws IOException - Throws:
IOException
-
fromXContent
- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-