public interface ObjectPool
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
borrowObject()
Borrow one from pool until it's available.
|
Object |
borrowObject(long timeout)
Borrow one from pool within given time(ms).
|
void |
close()
Close the pool.
|
void |
discardObject(Object object)
Discard this one when it was invalid or expired.
|
ObjectDetail |
getDetail(Object object)
Get the pooled object's detail
|
void |
givebackObject(Object object)
Give back the pooled object to pool.
|
ObjectDetail getDetail(Object object)
object - Object borrowObject() throws Exception
ExceptionObject borrowObject(long timeout) throws Exception
timeout - Exceptionvoid givebackObject(Object object) throws Exception
object - Exceptionvoid discardObject(Object object) throws Exception
object - ExceptionCopyright © 2021. All rights reserved.