E - public interface ObjectFactory<E>
| Modifier and Type | Method and Description |
|---|---|
E |
create() |
void |
initialize(E obj)
Method to initialize/re-initialize the object
when the object is borrowed from an
ObjectPool. |
void |
reset(E obj)
Method to reset the object
when the object is released, to return to an
ObjectPool. |
E create()
void initialize(E obj)
ObjectPool. That way,
any object coming out of a pool is set properly
in a user-controlled state.obj - void reset(E obj)
ObjectPool. That way,
any object returning to a pool is properly cleaned-upobj - Copyright © 2017. All rights reserved.