Examples of operationThreaded()


Examples of org.elasticsearch.action.index.IndexRequest.operationThreaded()

    // we just send a response, no need to fork
    indexRequest.listenerThreaded(true);

    // we don't spawn, then fork if local
    indexRequest.operationThreaded(true);

    return indexRequest;
  }

  /**
 
View Full Code Here

Examples of org.elasticsearch.action.index.IndexRequest.operationThreaded()

    @Override
    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
        IndexRequest indexRequest = new IndexRequest(request.param("index"), request.param("type"), request.param("id"));
        indexRequest.listenerThreaded(false);
        indexRequest.operationThreaded(true);
        indexRequest.routing(request.param("routing"));
        indexRequest.parent(request.param("parent")); // order is important, set it after routing, so it will set the routing
        indexRequest.timestamp(request.param("timestamp"));
        if (request.hasParam("ttl")) {
            indexRequest.ttl(request.paramAsTime("ttl", null).millis());
View Full Code Here

Examples of org.elasticsearch.action.index.IndexRequest.operationThreaded()

                    .source(updatedSourceAsMap, updateSourceContentType)
                    .version(updateVersion).versionType(request.versionType())
                    .replicationType(request.replicationType()).consistencyLevel(request.consistencyLevel())
                    .timestamp(timestamp).ttl(ttl)
                    .refresh(request.refresh());
            indexRequest.operationThreaded(false);
            return new Result(indexRequest, Operation.INDEX, updatedSourceAsMap, updateSourceContentType);
        } else if ("delete".equals(operation)) {
            DeleteRequest deleteRequest = Requests.deleteRequest(request.index()).type(request.type()).id(request.id()).routing(routing).parent(parent)
                    .version(updateVersion).versionType(request.versionType())
                    .replicationType(request.replicationType()).consistencyLevel(request.consistencyLevel());
View Full Code Here

Examples of org.elasticsearch.action.percolate.PercolateRequest.operationThreaded()

        percolateRequest.source(request.contentByteArray(), request.contentByteArrayOffset(), request.contentLength(), request.contentUnsafe());

        // we just send a response, no need to fork
        percolateRequest.listenerThreaded(false);
        // we don't spawn, then fork if local
        percolateRequest.operationThreaded(true);

        percolateRequest.preferLocal(request.paramAsBoolean("prefer_local", percolateRequest.preferLocalShard()));
        client.percolate(percolateRequest, new ActionListener<PercolateResponse>() {
            @Override public void onResponse(PercolateResponse response) {
                try {
View Full Code Here

Examples of org.elasticsearch.action.view.ViewRequest.operationThreaded()

        }

        // we just send a response, no need to fork
        viewRequest.listenerThreaded(false);
        // we don't spawn, then fork if local
        viewRequest.operationThreaded(true);

        client.execute(ViewAction.INSTANCE, viewRequest, new ActionListener<ViewResponse>() {

            public void onResponse(ViewResponse response) {
                try {
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.