List of usage examples for org.apache.solr.client.solrj.response SolrResponseBase setElapsedTime
public void setElapsedTime(long elapsedTime)
From source file:org.apache.blur.slur.SolrLookingBlurServer.java
License:Apache License
@SuppressWarnings("unchecked") private <T extends SolrResponseBase> T respond(Class<T> typ, Command command) throws SolrServerException { SolrResponseBase response; long start = System.currentTimeMillis(); try {/*from w ww.j a v a 2 s . c om*/ response = typ.newInstance(); command.process(); } catch (Exception e) { throw new SolrServerException("Unable to complete update request.", e); } response.setElapsedTime((System.currentTimeMillis() - start)); return (T) response; }