public abstract class SqlConnectionImpl<C extends SqlConnectionImpl> extends SqlConnectionBase<C> implements SqlConnection, Connection.Holder
conn, context| Constructor and Description |
|---|
SqlConnectionImpl(Context context,
Connection conn) |
| Modifier and Type | Method and Description |
|---|---|
Transaction |
begin()
Begin a transaction and returns a
Transaction for controlling and tracking
this transaction. |
Transaction |
begin(boolean closeOnEnd) |
void |
close()
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.
|
C |
exceptionHandler(Handler<Throwable> handler)
Set an handler called with connection errors.
|
void |
handleClosed() |
void |
handleException(Throwable err) |
abstract void |
handleNotification(int processId,
String channel,
String payload) |
boolean |
isSSL() |
protected void |
schedule(CommandBase<?> cmd) |
<R> void |
schedule(CommandBase<R> cmd,
Handler<? super CommandResponse<R>> handler) |
preparepreparedBatch, preparedBatch, preparedQuery, preparedQuery, preparedQuery, preparedQuery, query, queryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprepare, preparedBatch, preparedBatch, preparedQuery, preparedQuery, preparedQuery, preparedQuery, query, querypublic SqlConnectionImpl(Context context, Connection conn)
public void handleClosed()
handleClosed in interface Connection.Holderpublic <R> void schedule(CommandBase<R> cmd, Handler<? super CommandResponse<R>> handler)
schedule in interface CommandSchedulerprotected void schedule(CommandBase<?> cmd)
public void handleException(Throwable err)
handleException in interface Connection.Holderpublic boolean isSSL()
isSSL 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 Transaction begin()
SqlConnectionTransaction for controlling and tracking
this transaction.
When the connection is explicitely closed, any inflight transaction is rollbacked.begin in interface SqlConnectionpublic Transaction begin(boolean closeOnEnd)
public abstract void handleNotification(int processId,
String channel,
String payload)
handleNotification in interface Connection.Holderpublic void close()
SqlConnectionclose in interface SqlClientclose in interface SqlConnectionCopyright © 2020. All rights reserved.