Module org.elasticsearch.server
Class MasterNodeReadRequest<Request extends MasterNodeReadRequest<Request>>
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.AbstractTransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.LegacyActionRequest
org.elasticsearch.action.support.master.MasterNodeRequest<Request>
org.elasticsearch.action.support.master.MasterNodeReadRequest<Request>
- All Implemented Interfaces:
Writeable,RefCounted,TaskAwareRequest,TransportRequest
- Direct Known Subclasses:
ClusterHealthRequest,ClusterSearchShardsRequest,ClusterStateRequest,DesiredBalanceRequest,ExplainDataStreamLifecycleAction.Request,GetDesiredNodesAction.Request,GetRepositoriesRequest,GetStoredScriptRequest,IndicesShardStoresRequest,PendingClusterTasksRequest,PrevalidateNodeRemovalRequest,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
INFINITE_MASTER_NODE_TIMEOUT, 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
masterNodeTimeout, masterNodeTimeout, masterTermMethods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult, validateMethods inherited from class org.elasticsearch.transport.AbstractTransportRequest
getParentTask, getRequestId, remoteAddress, remoteAddress, setParentTask, setRequestId, toStringMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, hasReferences, incRef, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.core.RefCounted
decRef, hasReferences, incRef, mustIncRef, tryIncRefMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, 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:-
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 an infinite
timeout,
MasterNodeRequest.INFINITE_MASTER_NODE_TIMEOUT, since it is reasonable to wait for as long as necessary for internal requests to complete.
-
For requests which originate in the REST layer, use
-
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).
-