All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.searchbox.cluster.UpdateSettings Maven / Gradle / Ivy

package io.searchbox.cluster;

import io.searchbox.action.AbstractAction;
import io.searchbox.action.GenericResultAbstractAction;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
 * Allows to update cluster wide specific settings. Settings updated can either be persistent (applied cross restarts)
 * or transient (will not survive a full cluster restart). The cluster responds with the settings updated.
 * 
*
* There is a specific list of settings that can be updated, please see * Elasticsearch docs * for more information. * * @author cihat keser */ public class UpdateSettings extends GenericResultAbstractAction { protected UpdateSettings(Builder builder) { super(builder); setURI(buildURI()); this.payload = builder.source; } protected String buildURI() { return super.buildURI() + "/_cluster/settings"; } @Override public String getRestMethodName() { return "PUT"; } @Override public int hashCode() { return new HashCodeBuilder() .appendSuper(super.hashCode()) .toHashCode(); } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } return new EqualsBuilder() .appendSuper(super.equals(obj)) .isEquals(); } public static class Builder extends AbstractAction.Builder { private final Object source; /** * There is a specific list of settings that can be updated, please see * Elasticsearch docs * for more information. */ public Builder(Object source) { this.source = source; } @Override public UpdateSettings build() { return new UpdateSettings(this); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy