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,Writeable,org.elasticsearch.core.RefCounted,TaskAwareRequest
- Direct Known Subclasses:
AddIndexBlockRequest,CleanupRepositoryRequest,CloseIndexRequest,ClusterRerouteRequest,ClusterUpdateSettingsRequest,CreateIndexRequest,DeleteDanglingIndexRequest,DeleteIndexRequest,DeletePipelineRequest,DeleteRepositoryRequest,DeleteStoredScriptRequest,ImportDanglingIndexRequest,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.EmptyNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic org.elasticsearch.core.TimeValueprotected org.elasticsearch.core.TimeValueFields inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotected -
Method Summary
Modifier and TypeMethodDescriptionorg.elasticsearch.core.TimeValueReturns the acknowledgement timeoutorg.elasticsearch.core.TimeValuetimeout()Returns the current timeoutAllows to set the timeouttimeout(org.elasticsearch.core.TimeValue timeout)Allows to set the timeoutvoidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
masterNodeTimeout, masterNodeTimeout, masterNodeTimeoutMethods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult, validateMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.cluster.ack.AckedRequest
masterNodeTimeoutMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Field Details
-
DEFAULT_ACK_TIMEOUT
public static final org.elasticsearch.core.TimeValue DEFAULT_ACK_TIMEOUT -
timeout
protected org.elasticsearch.core.TimeValue timeout
-
-
Constructor Details
-
AcknowledgedRequest
protected AcknowledgedRequest() -
AcknowledgedRequest
- Throws:
IOException
-
-
Method Details
-
timeout
Allows to set the timeout- Parameters:
timeout- timeout as a string (e.g. 1s)- Returns:
- the request itself
-
timeout
Allows to set the timeout- Parameters:
timeout- timeout as aTimeValue- Returns:
- the request itself
-
timeout
public final org.elasticsearch.core.TimeValue timeout()Returns the current timeout- Returns:
- the current timeout as a
TimeValue
-
ackTimeout
public org.elasticsearch.core.TimeValue ackTimeout()Description copied from interface:AckedRequestReturns the acknowledgement timeout- Specified by:
ackTimeoutin interfaceAckedRequest
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classMasterNodeRequest<Request extends MasterNodeRequest<Request>>- Throws:
IOException
-