Connection implementation delegating all R2DBC
calls to an internal getDelegate().
| Modifier and Type | Field and Description |
|---|---|
| private final Connection |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Publisher | |
| public Publisher | beginTransaction(TransactionDefinition
attributes for the transaction. definition)Implements io. |
| public Publisher | |
| public Publisher | commitTransaction()
Implements io. |
| public Batch | createBatch()
Implements io. Batch instance for building a batched request.
|
| public Publisher | createSavepoint(String
the name of the savepoint to create name)Implements io. |
| public Statement | createStatement(String
the SQL of the statement sql)Implements io. |
| public Connection | |
| public ConnectionMetadata | getMetadata()
Implements io. ConnectionMetadata about the product this Connection is connected to.
|
| public IsolationLevel | getTransactionIsolationLevel()
Implements io. IsolationLevel for this connection.
|
| public boolean | isAutoCommit()
Implements io. |
| public Publisher | releaseSavepoint(String
the name of the savepoint to release name)Implements io. |
| public Publisher | rollbackTransaction()
Implements io. |
| public Publisher | rollbackTransactionToSavepoint(String
the name of the savepoint to rollback to name)Implements io. |
| public Publisher | setAutoCommit(boolean
the isolation level for this transaction autoCommit)Implements io. |
| public Publisher | setLockWaitTimeout(Duration
the lock timeout for this connection. Support for timeout)no timeout is vendor-specific.Implements io. |
| public Publisher | setStatementTimeout(Duration
the statement timeout for this connection. timeout)Duration#ZERO indicates no timeout.Implements io. |
| public Publisher | setTransactionIsolationLevel(IsolationLevel
the isolation level for this transaction isolationLevel)Implements io. |
| public Publisher | validate(ValidationDepth
the validation depth depth)Implements io. ValidationDepth.
|
| delegate | back to summary |
|---|---|
| private final Connection delegate | |
| DefaultConnection | back to summary |
|---|---|
| public DefaultConnection(Connection delegate) | |
| beginTransaction | back to summary |
|---|---|
| public Publisher Implements io. Doc from io. Begins a new transaction. Calling this method disables | |
| beginTransaction | back to summary |
|---|---|
| public Publisher Implements io. Doc from io. Begins a new transaction. Calling this method disables
| |
| close | back to summary |
|---|---|
| public Publisher Implements io. Doc from io. Release any resources held by the | |
| commitTransaction | back to summary |
|---|---|
| public Publisher Implements io. Doc from io. Commits the current transaction. | |
| createBatch | back to summary |
|---|---|
| public Batch createBatch() Implements io. Doc from io. Creates a new | |
| createSavepoint | back to summary |
|---|---|
| public Publisher Implements io. Doc from io. Creates a savepoint in the current transaction. | |
| createStatement | back to summary |
|---|---|
| public Statement createStatement(String sql) Implements io. Doc from io. Creates a new statement for building a statement-based request. | |
| getDelegate | back to summary |
|---|---|
| public Connection getDelegate() | |
| getMetadata | back to summary |
|---|---|
| public ConnectionMetadata getMetadata() Implements io. Doc from io. Returns the
| |
| getTransactionIsolationLevel | back to summary |
|---|---|
| public IsolationLevel getTransactionIsolationLevel() Implements io. Doc from io. Returns the Isolation level is typically one of the following constants:
| |
| isAutoCommit | back to summary |
|---|---|
| public boolean isAutoCommit() Implements io. Doc from io. Returns the auto-commit mode for this connection.
| |
| releaseSavepoint | back to summary |
|---|---|
| public Publisher Implements io. Doc from io. Releases a savepoint in the current transaction. Calling this for drivers not supporting savepoint release results in a no-op. | |
| rollbackTransaction | back to summary |
|---|---|
| public Publisher Implements io. Doc from io. Rolls back the current transaction. | |
| rollbackTransactionToSavepoint | back to summary |
|---|---|
| public Publisher Implements io. Doc from io. Rolls back to a savepoint in the current transaction. | |
| setAutoCommit | back to summary |
|---|---|
| public Publisher Implements io. Doc from io. Configures the auto-commit mode for the current transaction.
If a connection is in auto-commit mode, then all Calling this method during an active transaction and the auto-commit mode is changed, the transaction is committed. Calling this method without changing auto-commit mode this invocation results in a no-op. | |
| setLockWaitTimeout | back to summary |
|---|---|
| public Publisher Implements io. Doc from io. Configures the lock acquisition timeout for statements to be executed using the current connection.
The default lock acquisition timeout is vendor-specific and can be specified for new connections through
In the case of | |
| setStatementTimeout | back to summary |
|---|---|
| public Publisher Implements io. Doc from io. Configures the statement timeout for statements to be executed using the current connection.
By default, there is no limit on the amount of time allowed for a running statement to complete unless specified through
The minimum amount of time can be used to either let the data source cancel the statement or attempt a client-side cancellation.
The timeout applies to statements through a combination of Note that the timeout applies until receiving the first response from the data source and does not span until | |
| setTransactionIsolationLevel | back to summary |
|---|---|
| public Publisher Implements io. Doc from io. Configures the isolation level for the connection. When called outside a transaction, then the isolation level applies for all subsequent transactions. Setting the isolation level within a transaction results in vendor-specific behavior. Isolation level is typically one of the following constants:
| |
| validate | back to summary |
|---|---|
| public Publisher Implements io. Doc from io. Validates the connection according to the given
| |