Package | Description |
---|---|
org.dromara.hutool.core.pool |
对象池封装实现
整体参考了: https://github.com/DanielYWoo/fast-object-pool/ https://github.com/apache/commons-pool |
org.dromara.hutool.core.pool.partition |
基于分区的对象池实现,参考:https://github.com/DanielYWoo/fast-object-pool
|
Modifier and Type | Method and Description |
---|---|
static PoolConfig |
PoolConfig.of()
创建
PoolConfig |
PoolConfig |
PoolConfig.setMaxIdle(long maxIdle)
设置最长空闲时间(在池中时间)
|
PoolConfig |
PoolConfig.setMaxSize(int maxSize)
设置最大池大小
|
PoolConfig |
PoolConfig.setMaxWait(long maxWait)
设置最长等待时间,用于在借出对象时,等待最长时间。
|
PoolConfig |
PoolConfig.setMinSize(int minSize)
设置最小(初始)池大小
|
Modifier and Type | Class and Description |
---|---|
class |
PartitionPoolConfig
分局对象池配置
|
Constructor and Description |
---|
PoolPartition(PoolConfig config,
BlockingQueue<Poolable<T>> queue,
ObjectFactory<T> objectFactory)
构造
|
Copyright © 2025. All rights reserved.