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

Examples of org.elasticsearch.action.admin.cluster.ping.single.SinglePingRequest.operationThreaded()


    @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

TOP
Copyright © 2018 www.massapi.com. 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.