public interface ObjectPool
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
borrowObject()
Borrow it until it's available.
|
Object |
borrowObject(long timeout)
Borrow it if you can in some time.
|
void |
close()
Close it
|
void |
discardObject(Object o)
Do it when the pooled object was invalid or expired
|
ObjectDetail |
getDetail(Object object)
Get object's detail
|
void |
givebackObject(Object o)
Please give back the pooled object on each calling.
|
ObjectDetail getDetail(Object object)
object - Object borrowObject() throws Exception
ExceptionObject borrowObject(long timeout) throws Exception
time - Exceptionvoid givebackObject(Object o) throws Exception
o - Exceptionvoid discardObject(Object o) throws Exception
o - ExceptionCopyright © 2020. All rights reserved.