redis源代码查看笔记(备忘)

来源:互联网 发布:e.target js 兼容 编辑:程序博客网 时间:2024/05/07 11:18

1 redis连接池,java客户端实现使用的是apache commons-pool;

2 当达到最大连接数使用的策略:

    1)WHEN_EXHAUSTED_BLOCK(默认策略)(A "when exhausted action" type indicating that when the pool is exhausted (i.e., the maximum number of active objects has been reached), theborrowObject method should block until a new object is available, or themaximum wait time has been reached.)

    2)WHEN_EXHAUSTED_FAIL(A "when exhausted action" type indicating that when the pool is exhausted (i.e., the maximum number of active objects has been reached), theborrowObject method should fail, throwing aNoSuchElementException.)

    3)WHEN_EXHAUSTED_GROW(A "when exhausted action" type indicating that when the pool is exhausted (i.e., the maximum number of active objects has been reached), theborrowObject method should simply create a new object anyway.)

0 0