public abstract class PoolBase<P extends Pool> extends SqlClientBase<P> implements Pool, Closeable
metrics, tracer| Constructor and Description |
|---|
PoolBase(EventLoopContext context,
ConnectionFactory factory,
QueryTracer tracer,
ClientMetrics metrics,
PoolOptions poolOptions) |
| Modifier and Type | Method and Description |
|---|---|
Future<Void> |
close()
Like
SqlClient.close(Handler) but returns a Future of the asynchronous result |
void |
close(Handler<AsyncResult<Void>> handler)
Close the pool and release the associated resources.
|
void |
close(Promise<Void> completion)
Close this resource, the
completion promise must be notified when the operation has completed. |
CloseFuture |
closeFuture() |
Future<SqlConnection> |
getConnection()
Like
Pool.getConnection(Handler) but returns a Future of the asynchronous result |
void |
getConnection(Handler<AsyncResult<SqlConnection>> handler)
Get a connection from the pool.
|
protected <T> PromiseInternal<T> |
promise() |
protected <T> PromiseInternal<T> |
promise(Handler<AsyncResult<T>> handler) |
<R> void |
schedule(CommandBase<R> cmd,
Promise<R> promise) |
protected abstract SqlConnectionImpl |
wrap(ContextInternal context,
Connection conn) |
appendQueryPlaceholder, preparedQuery, queryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpool, pool, pool, preparedQuery, query, withConnection, withConnection, withTransaction, withTransactionpublic PoolBase(EventLoopContext context, ConnectionFactory factory, QueryTracer tracer, ClientMetrics metrics, PoolOptions poolOptions)
public CloseFuture closeFuture()
protected <T> PromiseInternal<T> promise()
promise in class SqlClientBase<P extends Pool>protected <T> PromiseInternal<T> promise(Handler<AsyncResult<T>> handler)
promise in class SqlClientBase<P extends Pool>public void getConnection(Handler<AsyncResult<SqlConnection>> handler)
PoolgetConnection in interface Poolhandler - the handler that will get the connection resultpublic Future<SqlConnection> getConnection()
PoolPool.getConnection(Handler) but returns a Future of the asynchronous resultgetConnection in interface Poolpublic <R> void schedule(CommandBase<R> cmd, Promise<R> promise)
schedule in interface CommandSchedulerprotected abstract SqlConnectionImpl wrap(ContextInternal context, Connection conn)
public void close(Promise<Void> completion)
Closeablecompletion promise must be notified when the operation has completed.public Future<Void> close()
SqlClientSqlClient.close(Handler) but returns a Future of the asynchronous resultCopyright © 2021. All rights reserved.