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

Examples of org.elasticsearch.action.admin.cluster.ping.broadcast.BroadcastPingRequest


    public static SinglePingRequest pingSingleRequest(String index) {
        return new SinglePingRequest(index);
    }

    public static BroadcastPingRequest pingBroadcastRequest(String... indices) {
        return new BroadcastPingRequest(indices);
    }
View Full Code Here


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

    @Override public void handleRequest(final RestRequest request, final RestChannel channel) {
        BroadcastPingRequest broadcastPingRequest = new BroadcastPingRequest(RestActions.splitIndices(request.param("index")));
        broadcastPingRequest.queryHint(request.param("query_hint"));
        BroadcastOperationThreading operationThreading = BroadcastOperationThreading.fromString(request.param("operation_threading"), BroadcastOperationThreading.SINGLE_THREAD);
        if (operationThreading == BroadcastOperationThreading.NO_THREADS) {
            // since we don't spawn, don't allow no_threads, but change it to a single thread
            operationThreading = BroadcastOperationThreading.SINGLE_THREAD;
        }
        broadcastPingRequest.operationThreading(operationThreading);
        client.admin().cluster().ping(broadcastPingRequest, new ActionListener<BroadcastPingResponse>() {
            @Override public void onResponse(BroadcastPingResponse response) {
                try {
                    XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);
                    builder.startObject();
View Full Code Here

* @author kimchy (shay.banon)
*/
public class BroadcastPingRequestBuilder extends BaseClusterRequestBuilder<BroadcastPingRequest, BroadcastPingResponse> {

    public BroadcastPingRequestBuilder(ClusterAdminClient clusterClient) {
        super(clusterClient, new BroadcastPingRequest());
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.admin.cluster.ping.broadcast.BroadcastPingRequest

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.