Exemplo n.º 1
0
  /*
   * <p> Method terminate </p>
   * @param clientId
   * @return
   * @throws SQLException
   */
  public void terminate() {
    long start = System.currentTimeMillis();
    storableNodes.addAll(nodes.values());
    /*
    for (WebNode node : storableNodes) {
      removeNode(node);
    }
    */
    getQuery().storeVertices(storableNodes);
    getQuery().updateVertexTable();

    DBUtility.controlIndex(
        config.getConnection(),
        config.getDbVendor(),
        getConfig().getDestinationVertexTableEntry(),
        false);
    timeTermination = System.currentTimeMillis() - start;
    query.storeLinks(storableLinks.values());
    DBUtility.controlIndex(
        config.getConnection(), config.getDbVendor(), config.getDestinationEdgeTableEntry(), false);
    /*
     * for (Node node : storableNodes) { getQuery().storeVertices(storableNodes); }
     */

    // LOGGER.info("Finished writing remaining nodes and links after "
    // + timeTermination + "ms.");
    // return getQuery().getIsochroneBoundingBox();
  }
Exemplo n.º 2
0
 private void init() {
   DBUtility.truncateTable(
       config.getConnection(), getConfig().getDestinationVertexTableEntry().getTableName());
   DBUtility.controlIndex(
       config.getConnection(),
       config.getDbVendor(),
       getConfig().getDestinationVertexTableEntry(),
       true);
   DBUtility.truncateTable(
       config.getConnection(),
       getConfig().getDestinationVertexAnnotatedTableEntry().getTableName());
   if (getConfig().enableAreaCalculation()) {
     DBUtility.truncateTable(
         config.getConnection(), getConfig().getDestinationAreaBufferTableEntry().getTableName());
   }
 }