Class UpdateSettingsRequest
- 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.AcknowledgedRequest<UpdateSettingsRequest>
-
- org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequest
-
- All Implemented Interfaces:
IndicesRequest
,IndicesRequest.Replaceable
,AckedRequest
,Streamable
,Writeable
,ToXContent
,ToXContentObject
,TaskAwareRequest
public class UpdateSettingsRequest extends AcknowledgedRequest<UpdateSettingsRequest> implements IndicesRequest.Replaceable, ToXContentObject
Request for an update index settings action
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.Empty
-
Nested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
IndicesRequest.Replaceable
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested 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_TIMEOUT, timeout
-
Fields inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
DEFAULT_MASTER_NODE_TIMEOUT, masterNodeTimeout
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description UpdateSettingsRequest()
UpdateSettingsRequest(java.lang.String... indices)
Constructs a new request to update settings for one or more indicesUpdateSettingsRequest(Settings settings, java.lang.String... indices)
Constructs a new request to update settings for one or more indices
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object o)
UpdateSettingsRequest
fromXContent(XContentParser parser)
int
hashCode()
java.lang.String[]
indices()
Returns the array of indices that the action relates toUpdateSettingsRequest
indices(java.lang.String... indices)
Sets the indices to apply to settings update toIndicesOptions
indicesOptions()
Returns the indices options used to resolve indices.UpdateSettingsRequest
indicesOptions(IndicesOptions indicesOptions)
boolean
isPreserveExisting()
Returnstrue
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 totrue
this settings update will only add settings not already set on an index.Settings
settings()
UpdateSettingsRequest
settings(java.lang.String source, XContentType xContentType)
Sets the settings to be updated (either json or yaml format)UpdateSettingsRequest
settings(java.util.Map source)
Sets the settings to be updated (either json or yaml format)UpdateSettingsRequest
settings(Settings settings)
Sets the settings to be updatedUpdateSettingsRequest
settings(Settings.Builder settings)
Sets the settings to be updatedjava.lang.String
toString()
XContentBuilder
toXContent(XContentBuilder builder, ToXContent.Params params)
ActionRequestValidationException
validate()
void
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.-
Methods inherited from class org.elasticsearch.action.support.master.AcknowledgedRequest
ackTimeout, timeout, timeout, timeout
-
Methods inherited from class org.elasticsearch.action.support.master.MasterNodeRequest
masterNodeTimeout, masterNodeTimeout, masterNodeTimeout
-
Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult
-
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask
-
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.cluster.ack.AckedRequest
masterNodeTimeout
-
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Constructor Detail
-
UpdateSettingsRequest
public UpdateSettingsRequest()
-
UpdateSettingsRequest
public UpdateSettingsRequest(java.lang.String... indices)
Constructs a new request to update settings for one or more indices
-
UpdateSettingsRequest
public UpdateSettingsRequest(Settings settings, java.lang.String... indices)
Constructs a new request to update settings for one or more indices
-
-
Method Detail
-
validate
public ActionRequestValidationException validate()
- Specified by:
validate
in classActionRequest
-
indices
public java.lang.String[] indices()
Description copied from interface:IndicesRequest
Returns the array of indices that the action relates to- Specified by:
indices
in interfaceIndicesRequest
-
settings
public Settings settings()
-
indices
public UpdateSettingsRequest indices(java.lang.String... indices)
Sets the indices to apply to settings update to- Specified by:
indices
in interfaceIndicesRequest.Replaceable
-
indicesOptions
public IndicesOptions indicesOptions()
Description copied from interface:IndicesRequest
Returns the indices options used to resolve indices. They tell for instance whether a single index is accepted, whether an empty array will be converted to _all, and how wildcards will be expanded if needed.- Specified by:
indicesOptions
in interfaceIndicesRequest
-
indicesOptions
public UpdateSettingsRequest indicesOptions(IndicesOptions indicesOptions)
-
settings
public UpdateSettingsRequest settings(Settings settings)
Sets the settings to be updated
-
settings
public UpdateSettingsRequest settings(Settings.Builder settings)
Sets the settings to be updated
-
settings
public UpdateSettingsRequest settings(java.lang.String source, XContentType xContentType)
Sets the settings to be updated (either json or yaml format)
-
isPreserveExisting
public boolean isPreserveExisting()
Returnstrue
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 isfalse
-
setPreserveExisting
public UpdateSettingsRequest setPreserveExisting(boolean preserveExisting)
Iff set totrue
this settings update will only add settings not already set on an index. Existing settings remain unchanged.
-
settings
public UpdateSettingsRequest settings(java.util.Map source)
Sets the settings to be updated (either json or yaml format)
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:Streamable
Set this object's fields from a StreamInput.- Specified by:
readFrom
in interfaceStreamable
- Overrides:
readFrom
in classAcknowledgedRequest<UpdateSettingsRequest>
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write this object's fields to a StreamOutput.- Specified by:
writeTo
in interfaceStreamable
- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classAcknowledgedRequest<UpdateSettingsRequest>
- Throws:
java.io.IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
fromXContent
public UpdateSettingsRequest fromXContent(XContentParser parser) throws java.io.IOException
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-