Package io.debezium.connector.mysql
Enum MySqlConnectorConfig.SnapshotLockingMode
java.lang.Object
java.lang.Enum<MySqlConnectorConfig.SnapshotLockingMode>
io.debezium.connector.mysql.MySqlConnectorConfig.SnapshotLockingMode
- All Implemented Interfaces:
EnumeratedValue
,Serializable
,Comparable<MySqlConnectorConfig.SnapshotLockingMode>
- Enclosing class:
MySqlConnectorConfig
public static enum MySqlConnectorConfig.SnapshotLockingMode
extends Enum<MySqlConnectorConfig.SnapshotLockingMode>
implements EnumeratedValue
The set of predefined Snapshot Locking Mode options.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionInject a custom mode, which allows for more control over snapshot locking.This mode will block all writes for the entire duration of the snapshot.The connector holds the global read lock for just the initial portion of the snapshot while the connector reads the database schemas and other metadata.The connector holds a (Percona-specific) backup lock for just the initial portion of the snapshot while the connector reads the database schemas and other metadata.This mode will avoid using ANY table locks during the snapshot process. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
getValue()
Determine if the supplied value is one of the predefined options.Determine if the supplied value is one of the predefined options.boolean
boolean
Returns the enum constant of this type with the specified name.values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
EXTENDED
This mode will block all writes for the entire duration of the snapshot. Replaces deprecated configuration option snapshot.locking.minimal with a value of false. -
MINIMAL
The connector holds the global read lock for just the initial portion of the snapshot while the connector reads the database schemas and other metadata. The remaining work in a snapshot involves selecting all rows from each table, and this can be done in a consistent fashion using the REPEATABLE READ transaction even when the global read lock is no longer held and while other MySQL clients are updating the database. Replaces deprecated configuration option snapshot.locking.minimal with a value of true. -
MINIMAL_PERCONA
The connector holds a (Percona-specific) backup lock for just the initial portion of the snapshot while the connector reads the database schemas and other metadata. This lock will only block DDL and DML on non-transactional tables (MyISAM etc.). The remaining work in a snapshot involves selecting all rows from each table, and this can be done in a consistent fashion using the REPEATABLE READ transaction even when the global read lock is no longer held and while other MySQL clients are updating the database. -
NONE
This mode will avoid using ANY table locks during the snapshot process. This mode can only be used with SnapShotMode set to schema_only or schema_only_recovery. -
CUSTOM
Inject a custom mode, which allows for more control over snapshot locking.
-
-
Field Details
-
value
-
-
Constructor Details
-
SnapshotLockingMode
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
- Specified by:
getValue
in interfaceEnumeratedValue
-
usesMinimalLocking
public boolean usesMinimalLocking() -
usesLocking
public boolean usesLocking() -
flushResetsIsolationLevel
public boolean flushResetsIsolationLevel() -
parse
Determine if the supplied value is one of the predefined options.- Parameters:
value
- the configuration property value; may not be null- Returns:
- the matching option, or null if no match is found
-
parse
Determine if the supplied value is one of the predefined options.- Parameters:
value
- the configuration property value; may not be nulldefaultValue
- the default value; may be null- Returns:
- the matching option, or null if no match is found and the non-null default is invalid
-