querqy.elasticsearch.rewriterstore.NodesReloadRewriterRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of querqy-elasticsearch Show documentation
Show all versions of querqy-elasticsearch Show documentation
Querqy library for query rewriting: Querqy for Elasticsearch
package querqy.elasticsearch.rewriterstore;
import org.elasticsearch.action.support.nodes.BaseNodeRequest;
import org.elasticsearch.action.support.nodes.BaseNodesRequest;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import java.io.IOException;
public class NodesReloadRewriterRequest extends BaseNodesRequest {
private final String rewriterId;
public NodesReloadRewriterRequest(final String rewriterId, final String... nodesIds) {
super(nodesIds);
this.rewriterId = rewriterId;
}
public NodesReloadRewriterRequest(final StreamInput in) throws IOException {
super(in);
rewriterId = in.readString();
}
@Override
public void writeTo(final StreamOutput out) throws IOException {
super.writeTo(out);
out.writeString(rewriterId);
}
public NodeRequest newNodeRequest() {
return new NodeRequest(rewriterId);
}
public String getRewriterId() {
return rewriterId;
}
public static class NodeRequest extends BaseNodeRequest {
String rewriterId;
public NodeRequest(final StreamInput in) throws IOException {
super(in);
rewriterId = in.readString();
}
public NodeRequest(final String rewriterId) {
super();
this.rewriterId = rewriterId;
}
@Override
public void writeTo(final StreamOutput out) throws IOException {
super.writeTo(out);
out.writeString(rewriterId);
}
public String getRewriterId() {
return rewriterId;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy