public abstract class PoolBase<P extends PoolBase<P>> extends SqlClientBase<P> implements Pool
| Constructor and Description |
|---|
PoolBase(Context context,
boolean closeVertx,
PoolOptions options) |
| Modifier and Type | Method and Description |
|---|---|
void |
begin(Handler<AsyncResult<Transaction>> handler)
Borrow a connection from the pool and begin a transaction, the underlying connection will be returned
to the pool when the transaction ends.
|
void |
close()
Close the pool and release the associated resources.
|
abstract void |
connect(Handler<AsyncResult<Connection>> completionHandler) |
protected void |
doClose() |
void |
getConnection(Handler<AsyncResult<SqlConnection>> handler)
Get a connection from the pool.
|
<R> void |
schedule(CommandBase<R> cmd,
Handler<? super CommandResponse<R>> handler) |
protected abstract SqlConnectionImpl |
wrap(Context context,
Connection conn) |
preparedBatch, preparedBatch, preparedQuery, preparedQuery, preparedQuery, preparedQuery, query, queryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpreparedBatch, preparedBatch, preparedQuery, preparedQuery, preparedQuery, preparedQuery, query, querypublic PoolBase(Context context, boolean closeVertx, PoolOptions options)
public abstract void connect(Handler<AsyncResult<Connection>> completionHandler)
public void getConnection(Handler<AsyncResult<SqlConnection>> handler)
PoolgetConnection in interface Poolhandler - the handler that will get the connection resultpublic void begin(Handler<AsyncResult<Transaction>> handler)
Poolpublic <R> void schedule(CommandBase<R> cmd, Handler<? super CommandResponse<R>> handler)
schedule in interface CommandSchedulerprotected abstract SqlConnectionImpl wrap(Context context, Connection conn)
protected void doClose()
Copyright © 2020. All rights reserved.