1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | public interface ObjectManager { /** * Retrieve an object instance of the give class from the object pool * for the given scope, identified by a scope type and a scope key. * * @param clazz the class * @param scopeType the type of the scope * @param scopeKey the key to identify the scope * * @return an object instance retrieved from the object pool */ public Object getObject(Class clazz, int scopeType, Object scopeKey); /** * Release an object back to the object pool. * * @param object the object to be released */ public void releaseObject(Object object); /** * Release all objects of the given scope, identified by a scope type * and a scope key. * @param scopeType the type of the scope that objects bound to * @param scopeKey the key to identify the scope */ public void releaseAll(int scopeType, Object scopeKey); } |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |