Class AcknowledgedRequest<Request extends MasterNodeRequest<Request>>
- java.lang.Object
-
- org.elasticsearch.transport.TransportMessage
-
- org.elasticsearch.transport.TransportRequest
-
- org.elasticsearch.action.ActionRequest
-
- org.elasticsearch.action.support.master.MasterNodeRequest<Request>
-
- org.elasticsearch.action.support.master.AcknowledgedRequest<Request>
-
- All Implemented Interfaces:
AckedRequest,Streamable,Writeable,TaskAwareRequest
- Direct Known Subclasses:
CloseIndexRequest,ClusterRerouteRequest,ClusterUpdateSettingsRequest,CreateIndexRequest,DeleteIndexRequest,DeletePipelineRequest,DeleteRepositoryRequest,DeleteStoredScriptRequest,IndicesAliasesRequest,OpenIndexRequest,PutMappingRequest,PutPipelineRequest,PutRepositoryRequest,PutStoredScriptRequest,ResizeRequest,RolloverRequest,UpdateSettingsRequest,UpgradeSettingsRequest,VerifyRepositoryRequest
public abstract class AcknowledgedRequest<Request extends MasterNodeRequest<Request>> extends MasterNodeRequest<Request> implements AckedRequest
Abstract class that allows to mark action requests that support acknowledgements. Facilitates consistency across different api.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.Empty
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
Fields Modifier and Type Field Description static TimeValueDEFAULT_ACK_TIMEOUTprotected TimeValuetimeout-
Fields inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAcknowledgedRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TimeValueackTimeout()Returns the acknowledgement timeoutvoidreadFrom(StreamInput in)Set this object's fields from a StreamInput.TimeValuetimeout()Returns the current timeoutRequesttimeout(java.lang.String timeout)Allows to set the timeoutRequesttimeout(TimeValue timeout)Allows to set the timeoutvoidwriteTo(StreamOutput out)Write this object's fields to a StreamOutput.-
Methods inherited from interface org.elasticsearch.cluster.ack.AckedRequest
masterNodeTimeout
-
Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult, validate
-
Methods inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
masterNodeTimeout, masterNodeTimeout, masterNodeTimeout
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.io.stream.Streamable
-
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask
-
-
-
-
Method Detail
-
timeout
public final Request timeout(java.lang.String timeout)
Allows to set the timeout- Parameters:
timeout- timeout as a string (e.g. 1s)- Returns:
- the request itself
-
timeout
public final Request timeout(TimeValue timeout)
Allows to set the timeout- Parameters:
timeout- timeout as aTimeValue- Returns:
- the request itself
-
timeout
public final TimeValue timeout()
Returns the current timeout- Returns:
- the current timeout as a
TimeValue
-
ackTimeout
public TimeValue ackTimeout()
Description copied from interface:AckedRequestReturns the acknowledgement timeout- Specified by:
ackTimeoutin interfaceAckedRequest
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:StreamableSet this object's fields from a StreamInput.- Specified by:
readFromin interfaceStreamable- Overrides:
readFromin classMasterNodeRequest<Request extends MasterNodeRequest<Request>>- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:StreamableWrite this object's fields to a StreamOutput.- Specified by:
writeToin interfaceStreamable- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classMasterNodeRequest<Request extends MasterNodeRequest<Request>>- Throws:
java.io.IOException
-
-