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_TIMEOUTFields inherited from interface org.elasticsearch.core.RefCounted
ALWAYS_REFERENCED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedMasterNodeReadRequest(TimeValue masterNodeTimeout) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanlocal()Return local information, do not retrieve the state from master node (default: false).final Requestlocal(boolean local) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
infiniteMasterNodeTimeout, masterNodeTimeout, masterNodeTimeout, masterTermMethods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult, validateMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, getRequestId, setParentTask, setRequestId, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, 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.core.RefCounted
mustIncRefMethods 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_ONEmeans 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_ONEwhich 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:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin 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:
trueif local information is to be returned;falseif information is to be retrieved from master node (default).
-