com.jolbox.bonecp.BoneCP.postDestroyConnection()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(148)

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

BoneCP.postDestroyConnection介绍

[英]Update counters and call hooks.
[中]更新计数器和调用挂钩。

代码示例

代码示例来源:origin: org.apache.sentry/sentry-shaded-miscellaneous

/** Closes off this connection
   * @param connection to close
   */
  protected void closeConnection(ConnectionHandle connection) {
    if (connection != null) {
      try {
        connection.internalClose();
      } catch (Throwable t) {
        logger.error("Destroy connection exception", t);
      } finally {
        this.pool.postDestroyConnection(connection);
      }
    }
}
}

代码示例来源:origin: org.apache.sentry/sentry-shaded-miscellaneous

/**
 * Physically close off the internal connection.
 * @param conn
 */
protected void destroyConnection(ConnectionHandle conn) {
  postDestroyConnection(conn);
  conn.setInReplayMode(true); // we're dead, stop attempting to replay anything
  try {
      conn.internalClose();
  } catch (SQLException e) {
    logger.error("Error in attempting to close connection", e);
  }
}

代码示例来源:origin: org.wisdom-framework/wisdom-jdbc-datasources

/**
 * Physically close off the internal connection.
 *
 * @param conn the connection
 */
protected void destroyConnection(ConnectionHandle conn) {
  postDestroyConnection(conn);
  // we're dead, stop attempting to replay anything
  conn.setInReplayMode(true);
  try {
    conn.internalClose();
  } catch (SQLException e) {
    LOGGER.error("Error in attempting to close connection", e);
  }
}

代码示例来源:origin: org.apache.sentry/sentry-shaded-miscellaneous

/** Closes off this connection
 * @param connection to close
 */
protected void closeConnection(ConnectionHandle connection) {
  if (connection != null && !connection.isClosed()) {
    try {
      connection.internalClose();
    } catch (SQLException e) {
      logger.error("Destroy connection exception", e);
    } finally {
      this.pool.postDestroyConnection(connection);
      connection.getOriginatingPartition().getPoolWatchThreadSignalQueue().offer(new Object()); // item being pushed is not important.
    }
  }
}

代码示例来源:origin: org.apache.sentry/sentry-shaded-miscellaneous

postDestroyConnection(connectionHandle);

代码示例来源:origin: org.wisdom-framework/wisdom-jdbc-datasources

postDestroyConnection(connectionHandle);

相关文章