BoneCP 异步获取连接

旗舰 发布于 2011/05/03 14:13
阅读 580
收藏 1

请问各位N人,BoneCP 异步获取连接是一个什么概率,和getConnection()区别是什么?  求详细描述......

加载中
0
旗舰
旗舰

打错别字了,概率---->概念

0
红薯
红薯

public Future<Connection> getAsyncConnection()

Obtain a connection asynchronously by queueing a request to obtain a connection in a separate thread. Use as follows:

    Future<Connection> result = pool.getAsyncConnection();
    ... do something else in your application here ...
    Connection connection = result.get(); // get the connection

    Returns: A Future task returning a connection.

还真不知道作者做这个方法是处于什么考虑

0
石头哥哥
石头哥哥
... do something else in your application here ... 难道异步在此??
返回顶部
顶部