T - The resource type, such as the connection.public interface TransactionOperations<T>
| Modifier and Type | Method and Description |
|---|---|
<R> R |
executeRead(TransactionCallback<T,R> callback)
Execute a read operation for the given
TransactionCallback. |
<R> R |
executeWrite(TransactionCallback<T,R> callback)
Execute a write operation for the given
TransactionCallback. |
T |
getConnection()
Obtains the connection for the current transaction.
|
@Nullable
<R> R executeWrite(@NonNull
TransactionCallback<T,R> callback)
TransactionCallback.R - The return typecallback - The callback@Nullable
<R> R executeRead(@NonNull
TransactionCallback<T,R> callback)
TransactionCallback.R - The return typecallback - The callback@NonNull T getConnection()
NoTransactionException - if no
connection exists for the current transaction