【问题标题】:HikariPoolMXBean - getThreadsAwaitingConnection - what do threads refer to?HikariPoolMXBean - getThreadsAwaitingConnection - 线程指的是什么?
【发布时间】:2021-05-27 23:21:51
【问题描述】:

我正在尝试使用 HikariPoolMXBean 来收集连接池指标并想清楚其中一个指标的含义:

/**
    * Get the number of threads awaiting connections from the pool.  The return value is extremely transient and is
    * a point-in-time measurement.
    *
    * @return the number of threads awaiting a connection from the pool
    */
   int getThreadsAwaitingConnection();

在这个指标的上下文中,什么是线程?它是应用程序线程、数据库线程还是其他什么?是不是 HikariCP 内部使用的线程?

【问题讨论】:

    标签: threadpool connection-pooling hikaricp


    【解决方案1】:

    HikariPoolMXBean 中的线程与您等待从池中获取连接的应用程序线程相关

    线程调用 DataSource.getConnection()

    【讨论】:

      猜你喜欢
      • 2016-02-16
      • 1970-01-01
      • 2011-07-09
      • 2010-11-14
      • 2021-09-09
      • 1970-01-01
      • 2021-12-09
      相关资源
      最近更新 更多