io.searchbox.cluster.NodesShutdown Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jest-common Show documentation
Show all versions of jest-common Show documentation
ElasticSearch Java REST client - shared library package
package io.searchbox.cluster;
import io.searchbox.action.AbstractMultiINodeActionBuilder;
import io.searchbox.action.GenericResultAbstractAction;
/**
* @author Dogukan Sonmez
* @author cihat keser
*/
public class NodesShutdown extends GenericResultAbstractAction {
protected NodesShutdown(Builder builder) {
super(builder);
setURI(buildURI());
}
@Override
protected String buildURI() {
return super.buildURI() + "/_nodes/" +
nodes +
"/_shutdown";
}
@Override
public String getRestMethodName() {
return "POST";
}
@Override
public String getPathToResult() {
return "nodes";
}
public static class Builder extends AbstractMultiINodeActionBuilder {
/**
* By default, the shutdown will be executed after a 1 second delay (1s).
* The delay can be customized by setting the delay parameter in a time value format.
*
* @param value e.g.: "1s" -> 1 second, "10m" -> 10 minutes
*/
public Builder delay(String value) {
return setParameter("delay", value);
}
@Override
public NodesShutdown build() {
return new NodesShutdown(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy