Apache Common Pool - 通用池组件 evict
在说 evict 之前,我们先看下 池对象的状态定义:
public enum PooledObjectState { IDLE, ALLOCATED, EVICTION, EVICTION_RETURN_TO_HEAD, VALIDATION, VALIDATION_PREALLOCATED, VALIDATION_RETURN_TO_HEAD, INVALID, ABANDONED, RETURNING; }
所谓 evict 就是把池里的对象踢出去,Evictor 类专门负责这个任务,它会调用 evict 方法,这个 evict 方法用 EvictionPolicy 类来做 evict 判断。
evict = evictionPolicy.evict(evictionConfig, underTest, this.idleObjects.size());
相关推荐
lysuperman 2012-01-16
ZSAQ00 2012-01-15
lovingchenhao 2011-06-17
eyeofcloud 2011-10-14
ZSAQ00 2011-10-02
谷歌底层营销灰烬 2010-12-13
hsxtlq 2017-07-06
Rachel0 2016-09-01
lovecloudpan 2016-03-29
hsxtlq 2016-01-11
hsxtlq 2015-12-13
lovingchenhao 2015-12-09
wpzhuti 2014-11-17
chenluhan 2014-09-18
eyeofcloud 2013-12-04
cheado 2012-02-17
QiYunFeiWork 2010-12-25
luyun0 2010-12-21
lysuperman 2010-11-29