Module org.elasticsearch.server
Class MasterNodeReadRequest<Request extends MasterNodeReadRequest<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.MasterNodeReadRequest<Request>
- All Implemented Interfaces:
Writeable
,RefCounted
,TaskAwareRequest
- Direct Known Subclasses:
ClusterGetSettingsAction.Request
,ClusterHealthRequest
,ClusterInfoRequest
,ClusterSearchShardsRequest
,ClusterStateRequest
,DesiredBalanceRequest
,ExplainDataStreamLifecycleAction.Request
,GetAliasesRequest
,GetComponentTemplateAction.Request
,GetComposableIndexTemplateAction.Request
,GetDataStreamAction.Request
,GetDataStreamLifecycleAction.Request
,GetDesiredNodesAction.Request
,GetIndexTemplatesRequest
,GetPipelineRequest
,GetRepositoriesRequest
,GetSettingsRequest
,GetStoredScriptRequest
,IndicesShardStoresRequest
,PendingClusterTasksRequest
,PrevalidateNodeRemovalRequest
,SimulateIndexTemplateRequest
,SimulateTemplateAction.Request
,TransportGetAllocationStatsAction.Request
public abstract class MasterNodeReadRequest<Request extends MasterNodeReadRequest<Request>>
extends MasterNodeRequest<Request>
Base request for master based read operations that allows to read the cluster state from the local node if needed
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
FieldsFields inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
TRAPPY_IMPLICIT_DEFAULT_MASTER_NODE_TIMEOUT
Fields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
protected
MasterNodeReadRequest
(TimeValue masterNodeTimeout) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
local()
Return local information, do not retrieve the state from master node (default: false).final Request
local
(boolean local) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
infiniteMasterNodeTimeout, masterNodeTimeout, masterNodeTimeout, masterTerm
Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult, validate
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, getRequestId, setParentTask, setRequestId, 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.core.RefCounted
mustIncRef
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Field Details
-
local
protected boolean local
-
-
Constructor Details
-
MasterNodeReadRequest
- Parameters:
masterNodeTimeout
- Specifies how long to wait when the master has not been discovered yet, or is disconnected, or is busy processing other tasks. The valueTimeValue.MINUS_ONE
means to wait forever in 8.15.0 onwards.For requests which originate in the REST layer, use
RestUtils.getMasterNodeTimeout(org.elasticsearch.rest.RestRequest)
to determine the timeout.For internally-generated requests, choose an appropriate timeout. Often this will be
TimeValue.MAX_VALUE
(orTimeValue.MINUS_ONE
which means an infinite timeout in 8.15.0 onwards) since usually we want internal requests to wait for as long as necessary to complete.
-
MasterNodeReadRequest
- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classMasterNodeRequest<Request extends MasterNodeReadRequest<Request>>
- Throws:
IOException
-
local
-
local
public final boolean local()Return local information, do not retrieve the state from master node (default: false).- Returns:
true
if local information is to be returned;false
if information is to be retrieved from master node (default).
-