Package gc.base.task

Examples of gc.base.task.TaskStats.incrementTime()


   
    // make the metadata document
    long t1 = System.currentTimeMillis();
    Document dom = DomUtil.makeDom(info.Xml_Metadata,true);
    long t2 = System.currentTimeMillis();
    stats.incrementTime(tn+".makeXmlDom",t2-t1);
   
    // interrogate the metadata document
    XmlInterrogator interrogator = new XmlInterrogator();
    XmlType xmlType = interrogator.interrogate(xmlTypes,dom);
    XsltReference xsltReference = xmlType.getToSolrXslt();
View Full Code Here


    XsltTemplate xsltTemplate = XsltTemplates.getCompiledTemplate(xsltReference.getSrc());
    info.MetadataType_Key = xmlType.getKey();
    info.MetadataType_Identifier = xmlType.getIdentifier();
    info.MetadataType_Indexables_Version = xsltReference.getVersion();
    long t3 = System.currentTimeMillis();
    stats.incrementTime(tn+".interrogateXmlType",t3-t2);
   
    // append fields at the top of the document
    this.append(context,doc,info,true,false);
   
    // transform the metadata document to a Solr document
View Full Code Here

    SolrDocSaxHandler saxHandler = new SolrDocSaxHandler(doc);
    DOMSource source = new DOMSource(dom);
    SAXResult result = new SAXResult(saxHandler);
    xsltTemplate.transform(source,result,null);
    long t4 = System.currentTimeMillis();
    stats.incrementTime(tn+".transformToSolrDoc",t4-t3);
   
    // append remaining fields
    this.append(context,doc,info,false,true);
   
  }
View Full Code Here

      }
      if (info.getMaxRows() > 0) st.setMaxRows(info.getMaxRows());
      if (info.getFetchSize() > 0) st.setFetchSize(info.getFetchSize());
      ResultSet rs = st.executeQuery();
      long t2 = System.currentTimeMillis();
      stats.incrementTime(tn+".executeQuery",t2-t1);
      while (rs.next()) {
        if (Thread.interrupted()) {
          throw new InterruptedException("Interrupted while iterating ResultSet.");
        }
        rowNum++;
View Full Code Here

        }
        rowNum++;
        handler.handleSqlRow(context,con,rs,rowNum);
      }
      long t3 = System.currentTimeMillis();
      stats.incrementTime(tn+".iterate",t3-t2);
    } finally {
      try {if (st != null) st.close();}
      catch (Exception ef) {ef.printStackTrace();}
      try {if (closeCon && (con != null)) con.close();}
      catch (Exception ef) {ef.printStackTrace();}
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.