public class SqlConnectionImpl<C extends SqlConnection> extends SqlConnectionBase<C> implements SqlConnection, Connection.Holder
conn, contextmetrics, tracer| Constructor and Description |
|---|
SqlConnectionImpl(ContextInternal context,
Connection conn,
QueryTracer tracer,
ClientMetrics metrics) |
| Modifier and Type | Method and Description |
|---|---|
Future<Transaction> |
begin()
Like
SqlConnection.begin(Handler) but returns a Future of the asynchronous result |
void |
begin(Handler<AsyncResult<Transaction>> handler)
Begin a transaction and returns a
Transaction for controlling and tracking
this transaction. |
Future<Void> |
close()
Like
SqlClient.close(Handler) but returns a Future of the asynchronous result |
void |
close(Handler<AsyncResult<Void>> handler)
Close the current connection after all the pending commands have been processed.
|
C |
closeHandler(Handler<Void> handler)
Set an handler called when the connection is closed.
|
DatabaseMetadata |
databaseMetadata() |
C |
exceptionHandler(Handler<Throwable> handler)
Set an handler called with connection errors.
|
void |
handleClosed() |
void |
handleEvent(Object event) |
void |
handleException(Throwable err) |
boolean |
isSSL() |
protected <T> PromiseInternal<T> |
promise() |
protected <T> PromiseInternal<T> |
promise(Handler<AsyncResult<T>> handler) |
<R> void |
schedule(CommandBase<R> cmd,
Promise<R> promise) |
prepare, prepareappendQueryPlaceholder, preparedQuery, queryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprepare, preparepreparedQuery, querypublic SqlConnectionImpl(ContextInternal context, Connection conn, QueryTracer tracer, ClientMetrics metrics)
protected <T> PromiseInternal<T> promise()
promise in class SqlClientBase<C extends SqlConnection>protected <T> PromiseInternal<T> promise(Handler<AsyncResult<T>> handler)
promise in class SqlClientBase<C extends SqlConnection>public void handleClosed()
handleClosed in interface Connection.Holderpublic <R> void schedule(CommandBase<R> cmd, Promise<R> promise)
schedule in interface CommandSchedulerpublic void handleException(Throwable err)
handleException in interface Connection.Holderpublic boolean isSSL()
isSSL in interface SqlConnectionpublic DatabaseMetadata databaseMetadata()
databaseMetadata in interface SqlConnectionpublic C closeHandler(Handler<Void> handler)
SqlConnectioncloseHandler in interface SqlConnectionhandler - the handlerpublic C exceptionHandler(Handler<Throwable> handler)
SqlConnectionexceptionHandler in interface SqlConnectionhandler - the handlerpublic Future<Transaction> begin()
SqlConnectionSqlConnection.begin(Handler) but returns a Future of the asynchronous resultbegin in interface SqlConnectionpublic void begin(Handler<AsyncResult<Transaction>> handler)
SqlConnectionTransaction for controlling and tracking
this transaction.
When the connection is explicitely closed, any inflight transaction is rollbacked.begin in interface SqlConnectionpublic void handleEvent(Object event)
handleEvent in interface Connection.Holderpublic Future<Void> close()
SqlClientSqlClient.close(Handler) but returns a Future of the asynchronous resultpublic void close(Handler<AsyncResult<Void>> handler)
SqlConnectionclose in interface SqlClientclose in interface SqlConnectionhandler - the completion handlerCopyright © 2021. All rights reserved.