Module org.elasticsearch.server
Class PutSampleConfigurationAction.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<PutSampleConfigurationAction.Request>
org.elasticsearch.action.support.master.AcknowledgedRequest<PutSampleConfigurationAction.Request>
org.elasticsearch.action.admin.indices.sampling.PutSampleConfigurationAction.Request
- All Implemented Interfaces:
IndicesRequest,IndicesRequest.Replaceable,Writeable,RefCounted,TaskAwareRequest,TransportRequest
- Enclosing class:
PutSampleConfigurationAction
public static class PutSampleConfigurationAction.Request
extends AcknowledgedRequest<PutSampleConfigurationAction.Request>
implements IndicesRequest.Replaceable
Request class for configuring sampling settings on indices.
This request encapsulates all the parameters needed to configure sampling on one or more indices,
including the sampling configuration itself and the target indices. It implements
IndicesRequest.Replaceable to support index name resolution and expansion.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.action.support.master.AcknowledgedRequest
AcknowledgedRequest.PlainNested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
IndicesRequest.RemoteClusterShardRequest, IndicesRequest.Replaceable, IndicesRequest.SingleIndexNoWildcardsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields inherited from class org.elasticsearch.action.support.master.AcknowledgedRequest
DEFAULT_ACK_TIMEOUTFields 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
ConstructorsConstructorDescriptionRequest(SamplingConfiguration samplingConfiguration, TimeValue masterNodeTimeout, TimeValue ackTimeout) Constructs a new request with the specified sampling configuration parameters.Request(StreamInput in) Constructs a new request by deserializing from a stream input. -
Method Summary
Modifier and TypeMethodDescriptionbooleanCompares this request with another object for equality.Returns the sampling configuration encapsulated by this request.inthashCode()Returns the hash code for this request.booleanIndicates whether this request should include data streams in addition to regular indices.String[]indices()Returns the array of target indices for this sampling configuration request.Sets the target indices or data streams for this sampling configuration request.Returns the indices options for this request, which control how index names are resolved and expanded.voidwriteTo(StreamOutput out) Serializes this request to a stream output.Methods inherited from class org.elasticsearch.action.support.master.AcknowledgedRequest
ackTimeout, ackTimeout, validateMethods inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
masterNodeTimeout, masterNodeTimeout, masterTermMethods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods 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, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.action.IndicesRequest.Replaceable
allowsCrossProject, allowsRemoteIndices, getProjectRouting, getResolvedIndexExpressions, setResolvedIndexExpressionsMethods inherited from interface org.elasticsearch.core.RefCounted
decRef, hasReferences, incRef, mustIncRef, tryIncRefMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, createTask, getDescription, setParentTask
-
Constructor Details
-
Request
public Request(SamplingConfiguration samplingConfiguration, @Nullable TimeValue masterNodeTimeout, @Nullable TimeValue ackTimeout) Constructs a new request with the specified sampling configuration parameters.- Parameters:
samplingConfiguration- the sampling configuration to applymasterNodeTimeout- the timeout for master node operations, or null for defaultackTimeout- the timeout for acknowledgment, or null for default
-
Request
Constructs a new request by deserializing from a stream input.- Parameters:
in- the stream input to read from- Throws:
IOException- if an I/O error occurs during deserialization
-
-
Method Details
-
writeTo
Serializes this request to a stream output.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classAcknowledgedRequest<PutSampleConfigurationAction.Request>- Parameters:
out- the stream output to write to- Throws:
IOException- if an I/O error occurs during serialization
-
indices
Returns the array of target indices for this sampling configuration request.- Specified by:
indicesin interfaceIndicesRequest- Returns:
- an array of index names, never null but may be empty
-
indices
Sets the target indices or data streams for this sampling configuration request.- Specified by:
indicesin interfaceIndicesRequest.Replaceable- Parameters:
indices- the names of indices or data streams to target- Returns:
- this request instance for method chaining
-
includeDataStreams
public boolean includeDataStreams()Indicates whether this request should include data streams in addition to regular indices.- Specified by:
includeDataStreamsin interfaceIndicesRequest- Returns:
- true to include data streams
-
indicesOptions
Returns the indices options for this request, which control how index names are resolved and expanded.- Specified by:
indicesOptionsin interfaceIndicesRequest- Returns:
- the indices options, configured to be strict about single index, no expansion, forbid closed indices, and allow selectors
-
getSampleConfiguration
Returns the sampling configuration encapsulated by this request.- Returns:
- the sampling configuration
-
equals
Compares this request with another object for equality.Two requests are considered equal if they have the same target indices and sampling configuration parameters.
-
hashCode
public int hashCode()Returns the hash code for this request.The hash code is computed based on the target indices, sampling configuration, master node timeout, and acknowledgment timeout.
-