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 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 timeoutvoid
readFrom(StreamInput in)
Set this object's fields from a StreamInput.TimeValue
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 object's fields to a 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
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:Streamable
Set this object's fields from a StreamInput.- Specified by:
readFrom
in interfaceStreamable
- Overrides:
readFrom
in classMasterNodeRequest<Request extends MasterNodeRequest<Request>>
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write this object's fields to a StreamOutput.- Specified by:
writeTo
in interfaceStreamable
- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classMasterNodeRequest<Request extends MasterNodeRequest<Request>>
- Throws:
java.io.IOException
-
-