Package org.elasticsearch.action.admin.cluster.ping.single

Examples of org.elasticsearch.action.admin.cluster.ping.single.SinglePingRequest


    public static NodesRestartRequest nodesRestartRequest(String... nodesIds) {
        return new NodesRestartRequest(nodesIds);
    }

    public static SinglePingRequest pingSingleRequest(String index) {
        return new SinglePingRequest(index);
    }
View Full Code Here


        controller.registerHandler(RestRequest.Method.GET, "/{index}/{type}/{id}/_ping", this);
        controller.registerHandler(RestRequest.Method.GET, "/_cluster/{index}/{type}/{id}/_ping", this);
    }

    @Override public void handleRequest(final RestRequest request, final RestChannel channel) {
        SinglePingRequest singlePingRequest = new SinglePingRequest(request.param("index"), request.param("type"), request.param("id"));
        // no need to have a threaded listener since we just send back a response
        singlePingRequest.listenerThreaded(false);
        // if we have a local operation, execute it on a thread since we don't spawn
        singlePingRequest.operationThreaded(true);
        client.admin().cluster().ping(singlePingRequest, new ActionListener<SinglePingResponse>() {
            @Override public void onResponse(SinglePingResponse result) {
                try {
                    XContentBuilder generator = RestXContentBuilder.restContentBuilder(request);
                    generator.startObject().field("ok", true).endObject();
View Full Code Here

* @author kimchy (shay.banon)
*/
public class SinglePingRequestBuilder extends BaseClusterRequestBuilder<SinglePingRequest, SinglePingResponse> {

    public SinglePingRequestBuilder(ClusterAdminClient clusterClient) {
        super(clusterClient, new SinglePingRequest());
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.admin.cluster.ping.single.SinglePingRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.