public interface MySqlTransactionDefinition
extends io.r2dbc.spi.TransactionDefinition
TransactionDefinition for a MySQL database.| Modifier and Type | Field and Description |
|---|---|
static io.r2dbc.spi.Option<String> |
CONSISTENT_SNAPSHOT_ENGINE
Use
WITH CONSISTENT [engine] SNAPSHOT for Facebook/MySQL or similar property. |
static io.r2dbc.spi.Option<Long> |
CONSISTENT_SNAPSHOT_FROM_SESSION
Use
WITH CONSISTENT SNAPSHOT FROM SESSION [session_id] for Percona/MySQL or similar property. |
static io.r2dbc.spi.Option<Boolean> |
WITH_CONSISTENT_SNAPSHOT
Use
WITH CONSISTENT SNAPSHOT property. |
| Modifier and Type | Method and Description |
|---|---|
MySqlTransactionDefinition |
consistent()
Creates a
MySqlTransactionDefinition retaining all configured options and applying to with
consistent snapshot. |
MySqlTransactionDefinition |
consistent(String engine)
Creates a
MySqlTransactionDefinition retaining all configured options and applying to with
consistent engine snapshot. |
MySqlTransactionDefinition |
consistent(String engine,
long sessionId)
Creates a
MySqlTransactionDefinition retaining all configured options and applying to with
consistent engine snapshot from session. |
MySqlTransactionDefinition |
consistentFromSession(long sessionId)
Creates a
MySqlTransactionDefinition retaining all configured options and applying to with
consistent snapshot from session. |
static MySqlTransactionDefinition |
empty()
Gets an empty
MySqlTransactionDefinition. |
static MySqlTransactionDefinition |
from(io.r2dbc.spi.IsolationLevel isolationLevel) |
MySqlTransactionDefinition |
isolationLevel(io.r2dbc.spi.IsolationLevel isolationLevel)
Creates a
MySqlTransactionDefinition retaining all configured options and applying
IsolationLevel. |
MySqlTransactionDefinition |
lockWaitTimeout(Duration timeout)
Creates a
MySqlTransactionDefinition retaining all configured options and applying a lock wait
timeout. |
static MySqlTransactionDefinition |
mutability(boolean readWrite)
Creates a
MySqlTransactionDefinition specifying transaction mutability. |
MySqlTransactionDefinition |
readOnly()
Creates a
MySqlTransactionDefinition retaining all configured options and using read-only
transaction semantics. |
MySqlTransactionDefinition |
readWrite()
Creates a
MySqlTransactionDefinition retaining all configured options and using explicitly
read-write transaction semantics. |
MySqlTransactionDefinition |
withoutConsistent()
Creates a
MySqlTransactionDefinition retaining all configured options and applying to without
consistent snapshot. |
MySqlTransactionDefinition |
withoutIsolationLevel()
Creates a
MySqlTransactionDefinition retaining all configured options and using the default
isolation level. |
MySqlTransactionDefinition |
withoutLockWaitTimeout()
Creates a
MySqlTransactionDefinition retaining all configured options and applying to use the
default lock wait timeout. |
MySqlTransactionDefinition |
withoutMutability()
Creates a
MySqlTransactionDefinition retaining all configured options and avoid to using
explicitly mutability. |
static final io.r2dbc.spi.Option<Boolean> WITH_CONSISTENT_SNAPSHOT
WITH CONSISTENT SNAPSHOT property.
The option starts a consistent read for storage engines such as InnoDB and XtraDB that can do so, the
same as if a START TRANSACTION followed by a SELECT ... from any InnoDB table was
issued.
static final io.r2dbc.spi.Option<String> CONSISTENT_SNAPSHOT_ENGINE
WITH CONSISTENT [engine] SNAPSHOT for Facebook/MySQL or similar property. Only available
when WITH_CONSISTENT_SNAPSHOT is set to true.
Note: This is an extended syntax based on specific distributions. Please check whether the server supports this property before using it.
static final io.r2dbc.spi.Option<Long> CONSISTENT_SNAPSHOT_FROM_SESSION
WITH CONSISTENT SNAPSHOT FROM SESSION [session_id] for Percona/MySQL or similar property.
Only available when WITH_CONSISTENT_SNAPSHOT is set to true.
The session_id is received by SHOW COLUMNS FROM performance_schema.processlist, it
should be an unsigned 64-bit integer. Use SHOW PROCESSLIST to find session identifier of the
process list.
Note: This is an extended syntax based on specific distributions. Please check whether the server supports this property before using it.
MySqlTransactionDefinition isolationLevel(io.r2dbc.spi.IsolationLevel isolationLevel)
MySqlTransactionDefinition retaining all configured options and applying
IsolationLevel.isolationLevel - the isolation level to use during the transaction.MySqlTransactionDefinition with the isolationLevel.IllegalArgumentException - if isolationLevel is null.MySqlTransactionDefinition withoutIsolationLevel()
MySqlTransactionDefinition retaining all configured options and using the default
isolation level. Removes transaction isolation level if configured already.MySqlTransactionDefinition without specified isolation level.MySqlTransactionDefinition readOnly()
MySqlTransactionDefinition retaining all configured options and using read-only
transaction semantics. Overrides transaction mutability if configured already.MySqlTransactionDefinition with read-only semantics.MySqlTransactionDefinition readWrite()
MySqlTransactionDefinition retaining all configured options and using explicitly
read-write transaction semantics. Overrides transaction mutability if configured already.MySqlTransactionDefinition with read-write semantics.MySqlTransactionDefinition withoutMutability()
MySqlTransactionDefinition retaining all configured options and avoid to using
explicitly mutability. Removes transaction mutability if configured already.MySqlTransactionDefinition without explicitly mutability.MySqlTransactionDefinition lockWaitTimeout(Duration timeout)
MySqlTransactionDefinition retaining all configured options and applying a lock wait
timeout. Overrides transaction lock wait timeout if configured already.
Note: for now, it is only available in InnoDB or InnoDB-compatible engines.
timeout - the lock wait timeout.MySqlTransactionDefinition with the timeout.IllegalArgumentException - if timeout is null.MySqlTransactionDefinition withoutLockWaitTimeout()
MySqlTransactionDefinition retaining all configured options and applying to use the
default lock wait timeout. Removes transaction lock wait timeout if configured already.MySqlTransactionDefinition without specified lock wait timeout.MySqlTransactionDefinition consistent()
MySqlTransactionDefinition retaining all configured options and applying to with
consistent snapshot. Overrides transaction consistency if configured already.MySqlTransactionDefinition with consistent snapshot semantics.MySqlTransactionDefinition consistent(String engine)
MySqlTransactionDefinition retaining all configured options and applying to with
consistent engine snapshot. Overrides transaction consistency if configured already.engine - the consistent snapshot engine, e.g. ROCKSDB.MySqlTransactionDefinition with consistent snapshot semantics.IllegalArgumentException - if engine is null.MySqlTransactionDefinition consistent(String engine, long sessionId)
MySqlTransactionDefinition retaining all configured options and applying to with
consistent engine snapshot from session. Overrides transaction consistency if configured already.engine - the consistent snapshot engine, e.g. ROCKSDB.sessionId - the session id.MySqlTransactionDefinition with consistent snapshot semantics.IllegalArgumentException - if engine is null.MySqlTransactionDefinition consistentFromSession(long sessionId)
MySqlTransactionDefinition retaining all configured options and applying to with
consistent snapshot from session. Overrides transaction consistency if configured already.sessionId - the session id.MySqlTransactionDefinition with consistent snapshot semantics.MySqlTransactionDefinition withoutConsistent()
MySqlTransactionDefinition retaining all configured options and applying to without
consistent snapshot. Removes transaction consistency if configured already.MySqlTransactionDefinition without consistent snapshot semantics.static MySqlTransactionDefinition empty()
MySqlTransactionDefinition.MySqlTransactionDefinition.static MySqlTransactionDefinition mutability(boolean readWrite)
MySqlTransactionDefinition specifying transaction mutability.readWrite - true for read-write, false to use a read-only transaction.MySqlTransactionDefinition using the specified transaction mutability.static MySqlTransactionDefinition from(io.r2dbc.spi.IsolationLevel isolationLevel)
Copyright © 2018–2024 asyncer.io. All rights reserved.