All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.elasticsearch.client.UpdateByQueryClientWrapper Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
package org.elasticsearch.client;

import org.elasticsearch.action.ActionFuture;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.updatebyquery.UpdateByQueryAction;
import org.elasticsearch.action.updatebyquery.UpdateByQueryRequest;
import org.elasticsearch.action.updatebyquery.UpdateByQueryRequestBuilder;
import org.elasticsearch.action.updatebyquery.UpdateByQueryResponse;

public class UpdateByQueryClientWrapper implements UpdateByQueryClient {

    protected final Client client;

    public UpdateByQueryClientWrapper(Client client) {
        this.client = client;
    }

    @Override
    public void updateByQuery(UpdateByQueryRequest request, ActionListener listener) {
        client.execute(UpdateByQueryAction.INSTANCE, request, listener);
    }

    @Override
    public ActionFuture updateByQuery(UpdateByQueryRequest request) {
        return client.execute(UpdateByQueryAction.INSTANCE, request);
    }

    @Override
    public UpdateByQueryRequestBuilder prepareUpdateByQuery() {
        return new UpdateByQueryRequestBuilder(client);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy