diff --git a/README.md b/README.md index 8d51aec..d5dba3a 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ maven-3.2.3+ # 2. Simple usage ## 2.1. PoolBuilder -| **config** | **default value** | **details** | +| **Config** | **Default value** | **Details** | | ---------- | ------------------ | ------------------------------------------------------------------------------------| | minimum | 0 | minimum allowed objects in pool | | maximum | 16 | maximum allowed objects in pool | @@ -64,7 +64,7 @@ maven-3.2.3+ | supplier   |         | required callback for creating pool objects          | | consumer | | optional callback for destroying pool objects | | validator | | optional callback for validating pool objects | -| validation | PULSE | precondition for `validator`, e.g : `new PoolValidation(PULSE\|ACQUIRE\| RELEASE)` | +| validation | PULSE | precondition for `validator`, e.g : `new PoolValidation(PULSE\|ACQUIRE\|RELEASE)` | ## 2.2. Usage @@ -182,7 +182,33 @@ Pool pool = new PoolBuilder() .build("object pool"); ``` -# 5. Benchmark +# 5. JMX + +MXBean : `cn.nextop.lite.pool:type=PoolConfig` + +| **Attribute** | **Modifiable** | **Details** | +|---------------|----------------|-----------------------------------------| +| Maximum | Yes | see [2.1. PoolBuilder](#21-poolbuilder) | +| Minimum | Yes | see [2.1. PoolBuilder](#21-poolbuilder) | +| Tenancy | Yes | see [2.1. PoolBuilder](#21-poolbuilder) | +| Timeout | Yes | see [2.1. PoolBuilder](#21-poolbuilder) | +| Tti | Yes | see [2.1. PoolBuilder](#21-poolbuilder) | +| Ttl | Yes | see [2.1. PoolBuilder](#21-poolbuilder) | +| Verbose | Yes | see [2.1. PoolBuilder](#21-poolbuilder) | +| Maximum | Yes | see [2.1. PoolBuilder](#21-poolbuilder) | +| Maximum | Yes | see [2.1. PoolBuilder](#21-poolbuilder) | + +MXBean : `cn.nextop.lite.pool:type=PoolAllocator` + +| **Attribute** | **Modifiable** | **Details** | +|---------------|----------------|-------------------------------------------------------------------| +| BusyCount | No | pool's busy object count, equivalent to `TotalCount - IdleCount`. | +| IdleCount | No | pool's idle object count. | +| TotalCount | No | pool's total object count. | +| PendingCount | No | pool's pending request object count. | + + +# 6. Benchmark Test env: diff --git a/README.zh_CN.md b/README.zh_CN.md index e1b4a69..e34fed8 100644 --- a/README.zh_CN.md +++ b/README.zh_CN.md @@ -11,7 +11,8 @@ * [2.2. 使用](#22-使用) * [3. PoolListener](#3-poollistener) * [4. 扩展自己的PoolAllocator](#4-扩展自己的poolallocator) - * [5. 基准测试](#5-基准测试) + * [5. JMX](#5-jmx) + * [6. 基准测试](#6-基准测试) # 1. Lite-pool @@ -63,7 +64,7 @@ maven-3.2.3+ | supplier   |         | 创建pool对象的回调方法, 必选项          | | consumer | | 销毁pool对象的回调方法, 可选项 | | validator | | 验证pool对象的回调方法, 可选项 | -| validation | PULSE | 验证pool对象的的前置条件, 例如:`new PoolValidation(PULSE\|ACQUIRE\| RELEASE)` | +| validation | PULSE | 验证pool对象的的前置条件, 例如:`new PoolValidation(PULSE\|ACQUIRE\|RELEASE)` | ## 2.2. 使用 @@ -181,7 +182,33 @@ Pool pool = new PoolBuilder() .build("object pool"); ``` -# 5. 基准测试 +# 5. JMX + +MXBean : `cn.nextop.lite.pool:type=PoolConfig` + +| **属性** | **可变更** | **详解** | +|---------------|----------------|-----------------------------------------| +| Maximum | 是 | 参照 [2.1. PoolBuilder](#21-poolbuilder) | +| Minimum | 是 | 参照 [2.1. PoolBuilder](#21-poolbuilder) | +| Tenancy | 是 | 参照 [2.1. PoolBuilder](#21-poolbuilder) | +| Timeout | 是 | 参照 [2.1. PoolBuilder](#21-poolbuilder) | +| Tti | 是 | 参照 [2.1. PoolBuilder](#21-poolbuilder) | +| Ttl | 是 | 参照 [2.1. PoolBuilder](#21-poolbuilder) | +| Verbose | 是 | 参照 [2.1. PoolBuilder](#21-poolbuilder) | +| Maximum | 是 | 参照 [2.1. PoolBuilder](#21-poolbuilder) | +| Maximum | 是 | 参照 [2.1. PoolBuilder](#21-poolbuilder) | + +MXBean : `cn.nextop.lite.pool:type=PoolAllocator` + +| **属性** | **可变更** | **详解** | +|---------------|----------------|-----------------------------------------------------------| +| BusyCount | 否 | pool中处于繁忙状态的对象数量, 等价于 `TotalCount - IdleCount` | +| IdleCount | 否 | pool中处于空闲状态的对象数量. | +| TotalCount | 否 | pool中总的对象数量. | +| PendingCount | 否 | pool中处于等待请求的对象数量. | + + +# 6. 基准测试 测试环境 :