Defines the common interface for async object pools. These are pools that do not block clients trying to acquire a resource from it. Different than the usual synchronous pool, you must return objects back to it manually since it's impossible for the pool to know when the object is ready to be given back.
Returns an object taken from the pool back to it. This object will become available for another client to use. If the object is invalid or can not be reused for some reason the scala.concurrent.Future returned will contain the error that prevented this object of being added back to the pool. The object is then discarded from the pool.
Returns an object taken from the pool back to it. This object will become available for another client to use. If the object is invalid or can not be reused for some reason the scala.concurrent.Future returned will contain the error that prevented this object of being added back to the pool. The object is then discarded from the pool.
Returns an object from the pool to the callee with the returned future. If the pool can not create or enqueue requests it will fill the returned scala.concurrent.Future with an com.github.mauricio.async.db.pool.PoolExhaustedException.
Returns an object from the pool to the callee with the returned future. If the pool can not create or enqueue requests it will fill the returned scala.concurrent.Future with an com.github.mauricio.async.db.pool.PoolExhaustedException.
Attributes
Returns
future that will eventually return a usable pool object.
Concrete methods
def use[A](f: T => Future[A])(implicit executionContext: ExecutionContext): Future[A]
Retrieve and use an object from the pool for a single computation, returning it when the operation completes.
Retrieve and use an object from the pool for a single computation, returning it when the operation completes.