Connection.
R2dbcTransactionManager binds instances of this class to the subscription,
for a specific ConnectionFactory.
Inherits rollback-only support for nested R2DBC transactions and reference count functionality from the base class.
Note
This is an SPI class, not intended to be used by applications.
R2dbcTransactionManager, ConnectionFactoryUtils
| Modifier and Type | Field and Description |
|---|---|
| private Connection | |
| pack-priv static final String | SAVEPOINT_NAME_PREFIX
Prefix for savepoint names. |
| private int | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | ConnectionHolder(Connection
the R2DBC connection)Connection to holdCreate a new ConnectionHolder for the given R2DBC |
| public | ConnectionHolder(Connection
the R2DBC connection, boolean Connection to holdwhether the given transactionActive)Connection is involved
in an ongoing transactionCreate a new ConnectionHolder for the given R2DBC |
| Modifier and Type | Method and Description |
|---|---|
| public void | clear()
Overrides org. Clear the transactional state of this resource holder. |
| public Connection | |
| protected boolean | |
| protected boolean | |
| pack-priv String | Returns: the name of the new savepointCreate a new savepoint for the current |
| public void | released()
Overrides org. Releases the current |
| protected void | |
| protected void | setTransactionActive(boolean transactionActive)
Set whether this holder represents an active, R2DBC-managed transaction. |
| currentConnection | back to summary |
|---|---|
| private Connection currentConnection
| |
| SAVEPOINT_NAME_PREFIX | back to summary |
|---|---|
| pack-priv static final String SAVEPOINT_NAME_PREFIX Prefix for savepoint names.
| |
| savepointCounter | back to summary |
|---|---|
| private int savepointCounter | |
| transactionActive | back to summary |
|---|---|
| private boolean transactionActive | |
| ConnectionHolder | back to summary |
|---|---|
| public ConnectionHolder(Connection connection) Create a new ConnectionHolder for the given R2DBC
| |
| ConnectionHolder | back to summary |
|---|---|
| public ConnectionHolder(Connection connection, boolean transactionActive) Create a new ConnectionHolder for the given R2DBC
| |
| clear | back to summary |
|---|---|
| public void clear() Overrides org. Doc from org. Clear the transactional state of this resource holder.
| |
| getConnection | back to summary |
|---|---|
| public Connection getConnection() Return the current This will be the same
| |
| hasConnection | back to summary |
|---|---|
| protected boolean hasConnection() Return whether this holder currently has a | |
| isTransactionActive | back to summary |
|---|---|
| protected boolean isTransactionActive() Return whether this holder represents an active, R2DBC-managed transaction. | |
| nextSavepoint | back to summary |
|---|---|
| pack-priv String nextSavepoint() Create a new savepoint for the current
| |
| released | back to summary |
|---|---|
| public void released() Overrides org. Releases the current
| |
| setConnection | back to summary |
|---|---|
| protected void setConnection(Connection connection) Override the existing Connection with the given Used for releasing the | |
| setTransactionActive | back to summary |
|---|---|
| protected void setTransactionActive(boolean transactionActive) Set whether this holder represents an active, R2DBC-managed transaction.
| |