public interface HostConnectionAccessor
Connection, in the context of a transaction.
Host must export this.
Host must implement this; may use com.atlassian.sal.spring.connection.SpringHostConnectionAccessor| Modifier and Type | Method and Description |
|---|---|
<A> A |
execute(boolean readOnly,
boolean newTransaction,
ConnectionCallback<A> callback)
Execute a callback which is supplied a
Connection, within a transaction. |
io.atlassian.fugue.Option<String> |
getSchemaName()
Returns the configured schema name (if any), for connections provided during
execute(boolean, boolean, ConnectionCallback) |
<A> A execute(boolean readOnly,
boolean newTransaction,
@Nonnull
ConnectionCallback<A> callback)
Connection, within a transaction.
It is up to the caller as to whether it attempts to participate in an existing transaction. This is explicitly
explained in TransactionalExecutor.
In the case of the callback returning normally:
autoCommit=false.
The following methods are guaranteed not to be called on connection:
Connection.setAutoCommit(boolean)
Connection.commit()
Connection.close()
Connection.rollback()
Connection.setReadOnly(boolean)
Connection.abort(java.util.concurrent.Executor)
Connection.setCatalog(String)
Connection.setSchema(String)
Connection.setTransactionIsolation(int)
Connection.setNetworkTimeout(java.util.concurrent.Executor, int)readOnly - connection should be read onlynewTransaction - attempt to create a new transaction even if there is already a "current" transactioncallback - mandatorycallback@Nonnull io.atlassian.fugue.Option<String> getSchemaName()
execute(boolean, boolean, ConnectionCallback)Copyright © 2018 Atlassian. All rights reserved.