Javadoc
Get an object from the pool.
If a valid object is available, it will be passed to the callback (possibly by the thread
that invoked get
. Depending on the implementation, checked out objects might not
be owned exclusively by the getter. If ownership is not exclusive, it's up to the implementation
to guarantee that checked out objects with shared ownership can be used in a thread safe manner.
The pool will determine if an idle object is valid by calling the Lifecycle's
validate
method.
If none is available, the method returns immediately. If the pool is not yet at
max capacity, object creation will be initiated.
Callbacks will be executed in FIFO order as objects become available to the pool (either
by other users, or as new object creation completes) or as the timeout expires.
After finishing with the object, the user must return the object to the pool with
put
.