Example usage for org.apache.solr.client.solrj.response UpdateResponse setElapsedTime

List of usage examples for org.apache.solr.client.solrj.response UpdateResponse setElapsedTime

Introduction

In this page you can find the example usage for org.apache.solr.client.solrj.response UpdateResponse setElapsedTime.

Prototype

public void setElapsedTime(long elapsedTime) 

Source Link

Usage

From source file:com.sindicetech.siren.solr.client.solrj.request.SirenUpdateRequest.java

License:Open Source License

@Override
public UpdateResponse process(SolrServer server) throws SolrServerException, IOException {
    long startTime = TimeUnit.MILLISECONDS.convert(System.nanoTime(), TimeUnit.NANOSECONDS);
    UpdateResponse res = new UpdateResponse();
    res.setResponse(server.request(this));
    long endTime = TimeUnit.MILLISECONDS.convert(System.nanoTime(), TimeUnit.NANOSECONDS);
    res.setElapsedTime(endTime - startTime);
    return res;/*from  w  ww  .  j a v  a 2 s.  com*/
}

From source file:ddf.catalog.cache.solr.impl.UninitializedSolrClientAdaptor.java

License:Open Source License

@Override
public UpdateResponse deleteByQuery(String query) throws SolrServerException, IOException {
    LOGGER.debug("Called deleteByQuery on un-initialized SolrClientAdaptor. Ignoring.");
    UpdateResponse updateResponse = new UpdateResponse();
    updateResponse.setElapsedTime(0);
    updateResponse.setRequestUrl("");
    updateResponse.setResponse(new NamedList<>());
    return updateResponse;
}