猎豆优选

ObjectPool.h 526B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // ObjectPool.h
  3. // mtopext
  4. //
  5. // Created by sihai on 5/12/14.
  6. // Copyright (c) 2014 Taobao. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @interface ObjectPool : NSObject
  10. /*!
  11. * 获取实例
  12. * @return
  13. * MtopServerPool
  14. */
  15. + (ObjectPool*) getInstance;
  16. /*!
  17. * pending
  18. * @param obj
  19. * @param timeout
  20. * @return
  21. * obj id
  22. */
  23. - (NSString*) pending: (id) obj timeout: (long) timeout;
  24. /*!
  25. * 移除之前pending的对象
  26. * @param oid
  27. */
  28. - (void) remove: (NSString*) oid;
  29. @end