org.intermine.sql.Database.getURL()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(9.2k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中org.intermine.sql.Database.getURL()方法的一些代码示例,展示了Database.getURL()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Database.getURL()方法的具体详情如下:
包路径:org.intermine.sql.Database
类名称:Database
方法名:getURL

Database.getURL介绍

[英]Gets the URL from this database
[中]从该数据库获取URL

代码示例

代码示例来源:origin: org.intermine/intermine-objectstore

/**
 * Called by the ShutdownHook on shutdown.
 */
public synchronized void shutdown() {
  LOG.info("Shutting down open ObjectStoreInterMineImpl with sequence = " + sequenceNumber
      + " and Database " + getDatabase().getURL());
  try {
    close();
  } catch (ObjectStoreException e) {
    LOG.warn("Exception caught while shutting down ObjectStoreInterMineImpl: "
        + e);
  }
}

代码示例来源:origin: org.intermine/intermine-objectstore

/**
 * Finalise this object.
 */
protected synchronized void doFinalise() {
  LOG.error("Garbage collecting ObjectStoreInterMineImpl with sequence = " + sequenceNumber
      + " and Database " + getDatabase().getURL());
  try {
    close();
  } catch (ObjectStoreException e) {
    LOG.error("Exception while garbage-collecting ObjectStoreInterMineImpl: "
        + e);
  }
}

代码示例来源:origin: intermine/intermine

/**
 * Finalise this object.
 */
protected synchronized void doFinalise() {
  LOG.error("Garbage collecting ObjectStoreInterMineImpl with sequence = " + sequenceNumber
      + " and Database " + getDatabase().getURL());
  try {
    close();
  } catch (ObjectStoreException e) {
    LOG.error("Exception while garbage-collecting ObjectStoreInterMineImpl: "
        + e);
  }
}

代码示例来源:origin: intermine/intermine

/**
 * Called by the ShutdownHook on shutdown.
 */
public synchronized void shutdown() {
  LOG.info("Shutting down open ObjectStoreInterMineImpl with sequence = " + sequenceNumber
      + " and Database " + getDatabase().getURL());
  try {
    close();
  } catch (ObjectStoreException e) {
    LOG.warn("Exception caught while shutting down ObjectStoreInterMineImpl: "
        + e);
  }
}

代码示例来源:origin: intermine/intermine

/**
 * Overrides Object.finalize - release the connection back to the objectstore.
 */
@Override
protected synchronized void doFinalise() {
  if (conn != null) {
    LOG.error("Garbage collecting open ObjectStoreWriterInterMineImpl with sequence = "
        + sequenceNumber + " and Database " + os.getDatabase().getURL()
        + ", createSituation: " + createSituation);
    try {
      close();
    } catch (ObjectStoreException e) {
      LOG.error("Exception while garbage-collecting ObjectStoreWriterInterMineImpl: "
          + e);
    }
  }
}

代码示例来源:origin: org.intermine/intermine-objectstore

/**
 * Called by the StatsShutdownHook on shutdown
 */
@Override
public synchronized void shutdown() {
  if (conn != null) {
    LOG.error("Shutting down open ObjectStoreWriterInterMineImpl with sequence = "
        + sequenceNumber + " and Database " + os.getDatabase().getURL()
        + ", createSituation = " + createSituation);
    try {
      close();
    } catch (ObjectStoreException e) {
      LOG.error("Exception caught while shutting down ObjectStoreWriterInterMineImpl: "
          + e);
    }
  }
}

代码示例来源:origin: intermine/intermine

/**
 * Called by the StatsShutdownHook on shutdown
 */
@Override
public synchronized void shutdown() {
  if (conn != null) {
    LOG.error("Shutting down open ObjectStoreWriterInterMineImpl with sequence = "
        + sequenceNumber + " and Database " + os.getDatabase().getURL()
        + ", createSituation = " + createSituation);
    try {
      close();
    } catch (ObjectStoreException e) {
      LOG.error("Exception caught while shutting down ObjectStoreWriterInterMineImpl: "
          + e);
    }
  }
}

代码示例来源:origin: org.intermine/intermine-objectstore

/**
 * Overrides Object.finalize - release the connection back to the objectstore.
 */
@Override
protected synchronized void doFinalise() {
  if (conn != null) {
    LOG.error("Garbage collecting open ObjectStoreWriterInterMineImpl with sequence = "
        + sequenceNumber + " and Database " + os.getDatabase().getURL()
        + ", createSituation: " + createSituation);
    try {
      close();
    } catch (ObjectStoreException e) {
      LOG.error("Exception while garbage-collecting ObjectStoreWriterInterMineImpl: "
          + e);
    }
  }
}

代码示例来源:origin: org.intermine/intermine-objectstore

/**
 * {@inheritDoc}
 */
@Override
public void finalize() throws Throwable {
  super.finalize();
  if (datasource instanceof com.zaxxer.hikari.HikariDataSource) {
    LOG.info("Finalise - Closing datasource for Database " + getURL() + "(" + toString()
        + ") with ClassLoader " + getClass().getClassLoader());
    ((com.zaxxer.hikari.HikariDataSource) datasource).close();
  } else if (datasource instanceof org.postgresql.ds.PGPoolingDataSource) {
    LOG.info("Finalise - Closing datasource for Database " + getURL() + "(" + toString()
        + ") with ClassLoader " + getClass().getClassLoader());
    ((org.postgresql.ds.PGPoolingDataSource) datasource).close();
  } else if (datasource instanceof org.postgresql.jdbc2.optional.PoolingDataSource) {
    LOG.info("Finalise - Closing datasource for Database " + getURL() + "(" + toString()
        + ") with ClassLoader " + getClass().getClassLoader());
    ((org.postgresql.jdbc2.optional.PoolingDataSource) datasource).close();
  } else {
    LOG.warn("Finalise - Could not close datasource for Database " + getURL() + "("
        + toString() + ") with ClassLoader " + getClass().getClassLoader() + " - "
        + datasource.getClass().toString());
  }
}

代码示例来源:origin: intermine/intermine

/**
 * {@inheritDoc}
 */
@Override
public void finalize() throws Throwable {
  super.finalize();
  if (datasource instanceof com.zaxxer.hikari.HikariDataSource) {
    LOG.info("Finalise - Closing datasource for Database " + getURL() + "(" + toString()
        + ") with ClassLoader " + getClass().getClassLoader());
    ((com.zaxxer.hikari.HikariDataSource) datasource).close();
  } else if (datasource instanceof org.postgresql.ds.PGPoolingDataSource) {
    LOG.info("Finalise - Closing datasource for Database " + getURL() + "(" + toString()
        + ") with ClassLoader " + getClass().getClassLoader());
    ((org.postgresql.ds.PGPoolingDataSource) datasource).close();
  } else if (datasource instanceof org.postgresql.jdbc2.optional.PoolingDataSource) {
    LOG.info("Finalise - Closing datasource for Database " + getURL() + "(" + toString()
        + ") with ClassLoader " + getClass().getClassLoader());
    ((org.postgresql.jdbc2.optional.PoolingDataSource) datasource).close();
  } else {
    LOG.warn("Finalise - Could not close datasource for Database " + getURL() + "("
        + toString() + ") with ClassLoader " + getClass().getClassLoader() + " - "
        + datasource.getClass().toString());
  }
}

代码示例来源:origin: org.intermine/intermine-objectstore

LOG.info("Shutdown - Closing datasource for Database " + getURL() + "(" + toString());
  ((com.zaxxer.hikari.HikariDataSource) datasource).close();
} else if (datasource instanceof org.postgresql.ds.PGPoolingDataSource) {
  LOG.info("Shutdown - Closing datasource for Database " + getURL() + "(" + toString()
      + ") with ClassLoader " + getClass().getClassLoader());
  ((org.postgresql.ds.PGPoolingDataSource) datasource).close();
} else if (datasource instanceof org.postgresql.jdbc2.optional.PoolingDataSource) {
  LOG.info("Shutdown - Closing datasource for Database " + getURL() + "(" + toString()
      + ") with ClassLoader " + getClass().getClassLoader());
  ((org.postgresql.jdbc2.optional.PoolingDataSource) datasource).close();
} else {
  LOG.warn("Shutdown - Could not close datasource for Database " + getURL() + "("
      + toString() + ") with ClassLoader " + getClass().getClassLoader() + " - "
      + datasource.getClass().toString());

代码示例来源:origin: intermine/intermine

LOG.info("Shutdown - Closing datasource for Database " + getURL() + "(" + toString());
  ((com.zaxxer.hikari.HikariDataSource) datasource).close();
} else if (datasource instanceof org.postgresql.ds.PGPoolingDataSource) {
  LOG.info("Shutdown - Closing datasource for Database " + getURL() + "(" + toString()
      + ") with ClassLoader " + getClass().getClassLoader());
  ((org.postgresql.ds.PGPoolingDataSource) datasource).close();
} else if (datasource instanceof org.postgresql.jdbc2.optional.PoolingDataSource) {
  LOG.info("Shutdown - Closing datasource for Database " + getURL() + "(" + toString()
      + ") with ClassLoader " + getClass().getClassLoader());
  ((org.postgresql.jdbc2.optional.PoolingDataSource) datasource).close();
} else {
  LOG.warn("Shutdown - Could not close datasource for Database " + getURL() + "("
      + toString() + ") with ClassLoader " + getClass().getClassLoader() + " - "
      + datasource.getClass().toString());

代码示例来源:origin: intermine/intermine

} catch (SQLException e) {
  throw new ObjectStoreException("Could not obtain connection to database "
                  + db.getURL() + "(user=" + db.getUser()
                  + ")", e);

代码示例来源:origin: org.intermine/intermine-objectstore

} catch (SQLException e) {
  throw new ObjectStoreException("Could not obtain connection to database "
                  + db.getURL() + "(user=" + db.getUser()
                  + ")", e);

代码示例来源:origin: org.intermine/intermine-objectstore

LOG.info("Creating new Database " + getURL() + "(" + toString() + ") and parallelism "
      + parallel);
} catch (Exception e) {

代码示例来源:origin: intermine/intermine

LOG.info("Creating new Database " + getURL() + "(" + toString() + ") and parallelism "
      + parallel);
} catch (Exception e) {

代码示例来源:origin: intermine/intermine

public void testURL() throws Exception {
  Database db = new Database(props);
  assertEquals("jdbc:postgresql://dbserver.mydomain.org/test", db.getURL());
}

代码示例来源:origin: intermine/intermine

isql.setUrl(database.getURL()); // "jdbc:postgresql://localhost/test"

代码示例来源:origin: org.intermine/intermine-objectstore

isql.setUrl(database.getURL()); // "jdbc:postgresql://localhost/test"

相关文章