ObjectPool



ObjectPool defines a simple pooling interface.

  • GenericObjectPool: ObjectPool implementation with a FIFO (First In First Out) behavior. This queue like behavior makes sure each object is regularly used. (helps preventing time-outs)
  • StackObjectPool: ObjectPool implementation with a LIFO (Last In First Out) behavior.
  • SoftReferenceObjectPool: ObjectPool implementation with a LIFO (Last In First Out) behavior. Additionally this pool wraps each object in a SoftReference allowing the garbage collector to remove them in response to memory demand.

KeyedObjectPool



A KeyedObjectPool pools instances of multiple types. Each type may be accessed using an arbitrary key.