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
,ModifyDataStreamsAction.Request
,OpenIndexRequest
,PutMappingRequest
,PutPipelineRequest
,PutRepositoryRequest
,PutStoredScriptRequest
,ResizeRequest
,RolloverRequest
,UpdateSettingsRequest
,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
Modifier and TypeFieldDescriptionstatic final org.elasticsearch.core.TimeValue
protected org.elasticsearch.core.TimeValue
Fields inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
protected
AcknowledgedRequest
(org.elasticsearch.core.TimeValue timeout) -
Method Summary
Modifier and TypeMethodDescriptionorg.elasticsearch.core.TimeValue
Returns the acknowledgement timeoutfinal org.elasticsearch.core.TimeValue
timeout()
Returns the current timeoutfinal Request
Allows to set the timeoutfinal Request
timeout
(org.elasticsearch.core.TimeValue timeout) Allows to set the timeoutvoid
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
masterNodeTimeout, masterNodeTimeout, masterNodeTimeout
Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult, validate
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask, toString
Methods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRef
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.cluster.ack.AckedRequest
masterNodeTimeout
Methods 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
protected AcknowledgedRequest(org.elasticsearch.core.TimeValue timeout) -
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:AckedRequest
Returns the acknowledgement timeout- Specified by:
ackTimeout
in interfaceAckedRequest
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classMasterNodeRequest<Request extends MasterNodeRequest<Request>>
- Throws:
IOException
-