public class UpdateSettingsRequest extends AcknowledgedRequest<UpdateSettingsRequest> implements IndicesRequest.Replaceable
TransportRequest.Empty
IndicesRequest.Replaceable
DEFAULT_ACK_TIMEOUT, timeout
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
Constructor and Description |
---|
UpdateSettingsRequest() |
UpdateSettingsRequest(Settings settings,
java.lang.String... indices)
Constructs a new request to update settings for one or more indices
|
UpdateSettingsRequest(java.lang.String... indices)
Constructs a new request to update settings for one or more indices
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
indices()
Returns the array of indices that the action relates to
|
UpdateSettingsRequest |
indices(java.lang.String... indices)
Sets the indices to apply to settings update to
|
IndicesOptions |
indicesOptions()
Returns the indices options used to resolve indices.
|
UpdateSettingsRequest |
indicesOptions(IndicesOptions indicesOptions) |
boolean |
isPreserveExisting()
Returns
true iff the settings update should only add but not update settings. |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
UpdateSettingsRequest |
setPreserveExisting(boolean preserveExisting)
Iff set to
true this settings update will only add settings not already set on an index. |
UpdateSettingsRequest |
settings(java.util.Map source)
Sets the settings to be updated (either json or yaml format)
|
UpdateSettingsRequest |
settings(Settings.Builder settings)
Sets the settings to be updated
|
UpdateSettingsRequest |
settings(Settings settings)
Sets the settings to be updated
|
UpdateSettingsRequest |
settings(java.lang.String source)
Deprecated.
use
settings(String, XContentType) to avoid content type detection |
UpdateSettingsRequest |
settings(java.lang.String source,
XContentType xContentType)
Sets the settings to be updated (either json or yaml format)
|
ActionRequestValidationException |
validate() |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
ackTimeout, readTimeout, timeout, timeout, timeout, writeTimeout
masterNodeTimeout, masterNodeTimeout, masterNodeTimeout
getShouldStoreResult
getParentTask, setParentTask
remoteAddress, remoteAddress
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
masterNodeTimeout
createTask, getDescription, setParentTask
public UpdateSettingsRequest()
public UpdateSettingsRequest(java.lang.String... indices)
public UpdateSettingsRequest(Settings settings, java.lang.String... indices)
public ActionRequestValidationException validate()
validate
in class ActionRequest
public java.lang.String[] indices()
IndicesRequest
indices
in interface IndicesRequest
public UpdateSettingsRequest indices(java.lang.String... indices)
indices
in interface IndicesRequest.Replaceable
public IndicesOptions indicesOptions()
IndicesRequest
indicesOptions
in interface IndicesRequest
public UpdateSettingsRequest indicesOptions(IndicesOptions indicesOptions)
public UpdateSettingsRequest settings(Settings settings)
public UpdateSettingsRequest settings(Settings.Builder settings)
@Deprecated public UpdateSettingsRequest settings(java.lang.String source)
settings(String, XContentType)
to avoid content type detectionpublic UpdateSettingsRequest settings(java.lang.String source, XContentType xContentType)
public boolean isPreserveExisting()
true
iff the settings update should only add but not update settings. If the setting already exists
it should not be overwritten by this update. The default is false
public UpdateSettingsRequest setPreserveExisting(boolean preserveExisting)
true
this settings update will only add settings not already set on an index. Existing settings remain
unchanged.public UpdateSettingsRequest settings(java.util.Map source)
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
readFrom
in class AcknowledgedRequest<UpdateSettingsRequest>
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
writeTo
in class AcknowledgedRequest<UpdateSettingsRequest>
java.io.IOException