Examples of listenerThreaded()


Examples of org.elasticsearch.action.admin.indices.recovery.RecoveryRequest.listenerThreaded()

    @Override
    public void doRequest(final RestRequest request, final RestChannel channel, final Client client) {
        final RecoveryRequest recoveryRequest = new RecoveryRequest(Strings.splitStringByCommaToArray(request.param("index")));
        recoveryRequest.detailed(request.paramAsBoolean("detailed", false));
        recoveryRequest.activeOnly(request.paramAsBoolean("active_only", false));
        recoveryRequest.listenerThreaded(false);
        recoveryRequest.indicesOptions(IndicesOptions.fromRequest(request, recoveryRequest.indicesOptions()));

        client.admin().indices().recoveries(recoveryRequest, new RestResponseListener<RecoveryResponse>(channel) {
            @Override
            public RestResponse buildResponse(final RecoveryResponse response) throws Exception {
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.refresh.RefreshRequest.listenerThreaded()

    }

    @Override public void handleRequest(final RestRequest request, final RestChannel channel) {
        RefreshRequest refreshRequest = new RefreshRequest(RestActions.splitIndices(request.param("index")));
        // we just send back a response, no need to fork a listener
        refreshRequest.listenerThreaded(false);
        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.THREAD_PER_SHARD;
        }
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.segments.IndicesSegmentsRequest.listenerThreaded()

    }

    @Override public void handleRequest(final RestRequest request, final RestChannel channel) {
        IndicesSegmentsRequest indicesSegmentsRequest = new IndicesSegmentsRequest(splitIndices(request.param("index")));
        // we just send back a response, no need to fork a listener
        indicesSegmentsRequest.listenerThreaded(false);
        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;
        }
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequest.listenerThreaded()

    }

    @Override
    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
        UpdateSettingsRequest updateSettingsRequest = updateSettingsRequest(Strings.splitStringByCommaToArray(request.param("index")));
        updateSettingsRequest.listenerThreaded(false);
        updateSettingsRequest.timeout(request.paramAsTime("timeout", updateSettingsRequest.timeout()));
        updateSettingsRequest.masterNodeTimeout(request.paramAsTime("master_timeout", updateSettingsRequest.masterNodeTimeout()));
        updateSettingsRequest.indicesOptions(IndicesOptions.fromRequest(request, updateSettingsRequest.indicesOptions()));

        ImmutableSettings.Builder updateSettings = ImmutableSettings.settingsBuilder();
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.stats.IndicesStatsRequest.listenerThreaded()

    }

    @Override
    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
        IndicesStatsRequest indicesStatsRequest = new IndicesStatsRequest();
        indicesStatsRequest.listenerThreaded(false);
        indicesStatsRequest.indicesOptions(IndicesOptions.fromRequest(request, indicesStatsRequest.indicesOptions()));
        indicesStatsRequest.indices(Strings.splitStringByCommaToArray(request.param("index")));
        indicesStatsRequest.types(Strings.splitStringByCommaToArray(request.param("types")));

        Set<String> metrics = Strings.splitStringByCommaToSet(request.param("metric", "_all"));
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.status.IndicesStatusRequest.listenerThreaded()

    }

    @Override public void handleRequest(final RestRequest request, final RestChannel channel) {
        IndicesStatusRequest indicesStatusRequest = new IndicesStatusRequest(splitIndices(request.param("index")));
        // we just send back a response, no need to fork a listener
        indicesStatusRequest.listenerThreaded(false);
        indicesStatusRequest.recovery(request.paramAsBoolean("recovery", indicesStatusRequest.recovery()));
        indicesStatusRequest.snapshot(request.paramAsBoolean("snapshot", indicesStatusRequest.snapshot()));
        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
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.template.delete.DeleteIndexTemplateRequest.listenerThreaded()

    }

    @Override
    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
        DeleteIndexTemplateRequest deleteIndexTemplateRequest = new DeleteIndexTemplateRequest(request.param("name"));
        deleteIndexTemplateRequest.listenerThreaded(false);
        deleteIndexTemplateRequest.masterNodeTimeout(request.paramAsTime("master_timeout", deleteIndexTemplateRequest.masterNodeTimeout()));
        client.admin().indices().deleteTemplate(deleteIndexTemplateRequest, new AcknowledgedRestListener<DeleteIndexTemplateResponse>(channel));
    }
}
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.template.get.GetIndexTemplatesRequest.listenerThreaded()

    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
        final String[] names = Strings.splitStringByCommaToArray(request.param("name"));

        GetIndexTemplatesRequest getIndexTemplatesRequest = new GetIndexTemplatesRequest(names);
        getIndexTemplatesRequest.local(request.paramAsBoolean("local", getIndexTemplatesRequest.local()));
        getIndexTemplatesRequest.listenerThreaded(false);

        final boolean implicitAll = getIndexTemplatesRequest.names().length == 0;

        client.admin().indices().getTemplates(getIndexTemplatesRequest, new RestBuilderListener<GetIndexTemplatesResponse>(channel) {
            @Override
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequest.listenerThreaded()

    @SuppressWarnings({"unchecked"})
    @Override
    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
        PutIndexTemplateRequest putRequest = new PutIndexTemplateRequest(request.param("name"));
        putRequest.listenerThreaded(false);
        putRequest.template(request.param("template", putRequest.template()));
        putRequest.order(request.paramAsInt("order", putRequest.order()));
        putRequest.masterNodeTimeout(request.paramAsTime("master_timeout", putRequest.masterNodeTimeout()));
        putRequest.create(request.paramAsBoolean("create", false));
        putRequest.cause(request.param("cause", ""));
View Full Code Here

Examples of org.elasticsearch.action.admin.indices.validate.query.ValidateQueryRequest.listenerThreaded()

    }

    @Override
    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
        ValidateQueryRequest validateQueryRequest = new ValidateQueryRequest(Strings.splitStringByCommaToArray(request.param("index")));
        validateQueryRequest.listenerThreaded(false);
        validateQueryRequest.indicesOptions(IndicesOptions.fromRequest(request, validateQueryRequest.indicesOptions()));
        if (request.hasContent()) {
            validateQueryRequest.source(request.content(), request.contentUnsafe());
        } else {
            String source = request.param("source");
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.