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 | Class and Description |
---|---|
class |
SimplePoolable<T>
简单可池化对象,此对象会同时持有原始对象和所在的分区
|
Modifier and Type | Class and Description |
---|---|
class |
PartitionPoolable<T>
分区可池化对象,此对象会同时持有原始对象和所在的分区
|
Modifier and Type | Method and Description |
---|---|
protected Poolable<T> |
PoolPartition.createPoolable()
|
Modifier and Type | Method and Description |
---|---|
protected BlockingQueue<Poolable<T>> |
PartitionObjectPool.createBlockingQueue(PartitionPoolConfig poolConfig)
创建阻塞队列,默认为
ArrayBlockingQueue 如果需要自定义队列类型,子类重写此方法 |
Constructor and Description |
---|
PoolPartition(PoolConfig config,
BlockingQueue<Poolable<T>> queue,
ObjectFactory<T> objectFactory)
构造
|
Copyright © 2025. All rights reserved.