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 booleanequals(java.lang.Object o)UpdateSettingsRequestfromXContent(XContentParser parser)inthashCode()java.lang.String[]indices()Returns the array of indices that the action relates toUpdateSettingsRequestindices(java.lang.String... indices)Sets the indices to apply to settings update toIndicesOptionsindicesOptions()Returns the indices options used to resolve indices.UpdateSettingsRequestindicesOptions(IndicesOptions indicesOptions)booleanisPreserveExisting()Returnstrueiff the settings update should only add but not update settings.voidreadFrom(StreamInput in)Set this object's fields from a StreamInput.UpdateSettingsRequestsetPreserveExisting(boolean preserveExisting)Iff set totruethis settings update will only add settings not already set on an index.Settingssettings()UpdateSettingsRequestsettings(java.lang.String source, XContentType xContentType)Sets the settings to be updated (either json or yaml format)UpdateSettingsRequestsettings(java.util.Map source)Sets the settings to be updated (either json or yaml format)UpdateSettingsRequestsettings(Settings settings)Sets the settings to be updatedUpdateSettingsRequestsettings(Settings.Builder settings)Sets the settings to be updatedjava.lang.StringtoString()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)ActionRequestValidationExceptionvalidate()voidwriteTo(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:
validatein classActionRequest
-
indices
public java.lang.String[] indices()
Description copied from interface:IndicesRequestReturns the array of indices that the action relates to- Specified by:
indicesin interfaceIndicesRequest
-
settings
public Settings settings()
-
indices
public UpdateSettingsRequest indices(java.lang.String... indices)
Sets the indices to apply to settings update to- Specified by:
indicesin interfaceIndicesRequest.Replaceable
-
indicesOptions
public IndicesOptions indicesOptions()
Description copied from interface:IndicesRequestReturns 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:
indicesOptionsin 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()
Returnstrueiff 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 totruethis 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:StreamableSet this object's fields from a StreamInput.- Specified by:
readFromin interfaceStreamable- Overrides:
readFromin classAcknowledgedRequest<UpdateSettingsRequest>- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:StreamableWrite this object's fields to a StreamOutput.- Specified by:
writeToin interfaceStreamable- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classAcknowledgedRequest<UpdateSettingsRequest>- Throws:
java.io.IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContentin 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:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-