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

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

本文整理了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

  1. /**
  2. * Called by the ShutdownHook on shutdown.
  3. */
  4. public synchronized void shutdown() {
  5. LOG.info("Shutting down open ObjectStoreInterMineImpl with sequence = " + sequenceNumber
  6. + " and Database " + getDatabase().getURL());
  7. try {
  8. close();
  9. } catch (ObjectStoreException e) {
  10. LOG.warn("Exception caught while shutting down ObjectStoreInterMineImpl: "
  11. + e);
  12. }
  13. }

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

  1. /**
  2. * Finalise this object.
  3. */
  4. protected synchronized void doFinalise() {
  5. LOG.error("Garbage collecting ObjectStoreInterMineImpl with sequence = " + sequenceNumber
  6. + " and Database " + getDatabase().getURL());
  7. try {
  8. close();
  9. } catch (ObjectStoreException e) {
  10. LOG.error("Exception while garbage-collecting ObjectStoreInterMineImpl: "
  11. + e);
  12. }
  13. }

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

  1. /**
  2. * Finalise this object.
  3. */
  4. protected synchronized void doFinalise() {
  5. LOG.error("Garbage collecting ObjectStoreInterMineImpl with sequence = " + sequenceNumber
  6. + " and Database " + getDatabase().getURL());
  7. try {
  8. close();
  9. } catch (ObjectStoreException e) {
  10. LOG.error("Exception while garbage-collecting ObjectStoreInterMineImpl: "
  11. + e);
  12. }
  13. }

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

  1. /**
  2. * Called by the ShutdownHook on shutdown.
  3. */
  4. public synchronized void shutdown() {
  5. LOG.info("Shutting down open ObjectStoreInterMineImpl with sequence = " + sequenceNumber
  6. + " and Database " + getDatabase().getURL());
  7. try {
  8. close();
  9. } catch (ObjectStoreException e) {
  10. LOG.warn("Exception caught while shutting down ObjectStoreInterMineImpl: "
  11. + e);
  12. }
  13. }

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

  1. /**
  2. * Overrides Object.finalize - release the connection back to the objectstore.
  3. */
  4. @Override
  5. protected synchronized void doFinalise() {
  6. if (conn != null) {
  7. LOG.error("Garbage collecting open ObjectStoreWriterInterMineImpl with sequence = "
  8. + sequenceNumber + " and Database " + os.getDatabase().getURL()
  9. + ", createSituation: " + createSituation);
  10. try {
  11. close();
  12. } catch (ObjectStoreException e) {
  13. LOG.error("Exception while garbage-collecting ObjectStoreWriterInterMineImpl: "
  14. + e);
  15. }
  16. }
  17. }

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

  1. /**
  2. * Called by the StatsShutdownHook on shutdown
  3. */
  4. @Override
  5. public synchronized void shutdown() {
  6. if (conn != null) {
  7. LOG.error("Shutting down open ObjectStoreWriterInterMineImpl with sequence = "
  8. + sequenceNumber + " and Database " + os.getDatabase().getURL()
  9. + ", createSituation = " + createSituation);
  10. try {
  11. close();
  12. } catch (ObjectStoreException e) {
  13. LOG.error("Exception caught while shutting down ObjectStoreWriterInterMineImpl: "
  14. + e);
  15. }
  16. }
  17. }

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

  1. /**
  2. * Called by the StatsShutdownHook on shutdown
  3. */
  4. @Override
  5. public synchronized void shutdown() {
  6. if (conn != null) {
  7. LOG.error("Shutting down open ObjectStoreWriterInterMineImpl with sequence = "
  8. + sequenceNumber + " and Database " + os.getDatabase().getURL()
  9. + ", createSituation = " + createSituation);
  10. try {
  11. close();
  12. } catch (ObjectStoreException e) {
  13. LOG.error("Exception caught while shutting down ObjectStoreWriterInterMineImpl: "
  14. + e);
  15. }
  16. }
  17. }

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

  1. /**
  2. * Overrides Object.finalize - release the connection back to the objectstore.
  3. */
  4. @Override
  5. protected synchronized void doFinalise() {
  6. if (conn != null) {
  7. LOG.error("Garbage collecting open ObjectStoreWriterInterMineImpl with sequence = "
  8. + sequenceNumber + " and Database " + os.getDatabase().getURL()
  9. + ", createSituation: " + createSituation);
  10. try {
  11. close();
  12. } catch (ObjectStoreException e) {
  13. LOG.error("Exception while garbage-collecting ObjectStoreWriterInterMineImpl: "
  14. + e);
  15. }
  16. }
  17. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public void finalize() throws Throwable {
  6. super.finalize();
  7. if (datasource instanceof com.zaxxer.hikari.HikariDataSource) {
  8. LOG.info("Finalise - Closing datasource for Database " + getURL() + "(" + toString()
  9. + ") with ClassLoader " + getClass().getClassLoader());
  10. ((com.zaxxer.hikari.HikariDataSource) datasource).close();
  11. } else if (datasource instanceof org.postgresql.ds.PGPoolingDataSource) {
  12. LOG.info("Finalise - Closing datasource for Database " + getURL() + "(" + toString()
  13. + ") with ClassLoader " + getClass().getClassLoader());
  14. ((org.postgresql.ds.PGPoolingDataSource) datasource).close();
  15. } else if (datasource instanceof org.postgresql.jdbc2.optional.PoolingDataSource) {
  16. LOG.info("Finalise - Closing datasource for Database " + getURL() + "(" + toString()
  17. + ") with ClassLoader " + getClass().getClassLoader());
  18. ((org.postgresql.jdbc2.optional.PoolingDataSource) datasource).close();
  19. } else {
  20. LOG.warn("Finalise - Could not close datasource for Database " + getURL() + "("
  21. + toString() + ") with ClassLoader " + getClass().getClassLoader() + " - "
  22. + datasource.getClass().toString());
  23. }
  24. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public void finalize() throws Throwable {
  6. super.finalize();
  7. if (datasource instanceof com.zaxxer.hikari.HikariDataSource) {
  8. LOG.info("Finalise - Closing datasource for Database " + getURL() + "(" + toString()
  9. + ") with ClassLoader " + getClass().getClassLoader());
  10. ((com.zaxxer.hikari.HikariDataSource) datasource).close();
  11. } else if (datasource instanceof org.postgresql.ds.PGPoolingDataSource) {
  12. LOG.info("Finalise - Closing datasource for Database " + getURL() + "(" + toString()
  13. + ") with ClassLoader " + getClass().getClassLoader());
  14. ((org.postgresql.ds.PGPoolingDataSource) datasource).close();
  15. } else if (datasource instanceof org.postgresql.jdbc2.optional.PoolingDataSource) {
  16. LOG.info("Finalise - Closing datasource for Database " + getURL() + "(" + toString()
  17. + ") with ClassLoader " + getClass().getClassLoader());
  18. ((org.postgresql.jdbc2.optional.PoolingDataSource) datasource).close();
  19. } else {
  20. LOG.warn("Finalise - Could not close datasource for Database " + getURL() + "("
  21. + toString() + ") with ClassLoader " + getClass().getClassLoader() + " - "
  22. + datasource.getClass().toString());
  23. }
  24. }

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

  1. LOG.info("Shutdown - Closing datasource for Database " + getURL() + "(" + toString());
  2. ((com.zaxxer.hikari.HikariDataSource) datasource).close();
  3. } else if (datasource instanceof org.postgresql.ds.PGPoolingDataSource) {
  4. LOG.info("Shutdown - Closing datasource for Database " + getURL() + "(" + toString()
  5. + ") with ClassLoader " + getClass().getClassLoader());
  6. ((org.postgresql.ds.PGPoolingDataSource) datasource).close();
  7. } else if (datasource instanceof org.postgresql.jdbc2.optional.PoolingDataSource) {
  8. LOG.info("Shutdown - Closing datasource for Database " + getURL() + "(" + toString()
  9. + ") with ClassLoader " + getClass().getClassLoader());
  10. ((org.postgresql.jdbc2.optional.PoolingDataSource) datasource).close();
  11. } else {
  12. LOG.warn("Shutdown - Could not close datasource for Database " + getURL() + "("
  13. + toString() + ") with ClassLoader " + getClass().getClassLoader() + " - "
  14. + datasource.getClass().toString());

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

  1. LOG.info("Shutdown - Closing datasource for Database " + getURL() + "(" + toString());
  2. ((com.zaxxer.hikari.HikariDataSource) datasource).close();
  3. } else if (datasource instanceof org.postgresql.ds.PGPoolingDataSource) {
  4. LOG.info("Shutdown - Closing datasource for Database " + getURL() + "(" + toString()
  5. + ") with ClassLoader " + getClass().getClassLoader());
  6. ((org.postgresql.ds.PGPoolingDataSource) datasource).close();
  7. } else if (datasource instanceof org.postgresql.jdbc2.optional.PoolingDataSource) {
  8. LOG.info("Shutdown - Closing datasource for Database " + getURL() + "(" + toString()
  9. + ") with ClassLoader " + getClass().getClassLoader());
  10. ((org.postgresql.jdbc2.optional.PoolingDataSource) datasource).close();
  11. } else {
  12. LOG.warn("Shutdown - Could not close datasource for Database " + getURL() + "("
  13. + toString() + ") with ClassLoader " + getClass().getClassLoader() + " - "
  14. + datasource.getClass().toString());

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

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

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

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

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

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

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

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

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

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

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

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

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

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

相关文章