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
,TaskAwareRequest
- Direct Known Subclasses:
CleanupRepositoryRequest
,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 TimeValue
DEFAULT_ACK_TIMEOUT
protected TimeValue
timeout
-
Fields inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AcknowledgedRequest()
protected
AcknowledgedRequest(StreamInput in)
-
Method Summary
Modifier and Type Method Description TimeValue
ackTimeout()
Returns the acknowledgement timeoutTimeValue
timeout()
Returns the current timeoutRequest
timeout(java.lang.String timeout)
Allows to set the timeoutRequest
timeout(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
-
Methods inherited from class org.elasticsearch.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.elasticsearch.cluster.ack.AckedRequest
masterNodeTimeout
-
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
-
-
-
Constructor Detail
-
AcknowledgedRequest
protected AcknowledgedRequest()
-
AcknowledgedRequest
protected AcknowledgedRequest(StreamInput in) throws java.io.IOException
- Throws:
java.io.IOException
-
-
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:AckedRequest
Returns the acknowledgement timeout- Specified by:
ackTimeout
in interfaceAckedRequest
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classMasterNodeRequest<Request extends MasterNodeRequest<Request>>
- Throws:
java.io.IOException
-
-