Enum MySqlConnectorConfig.SnapshotLockingMode

    • Enum Constant Detail

      • EXTENDED

        public static final MySqlConnectorConfig.SnapshotLockingMode 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

        public static final MySqlConnectorConfig.SnapshotLockingMode 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

        public static final MySqlConnectorConfig.SnapshotLockingMode 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

        public static final MySqlConnectorConfig.SnapshotLockingMode 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.
    • Field Detail

      • value

        private final String value
    • Constructor Detail

      • SnapshotLockingMode

        private SnapshotLockingMode​(String value)
    • Method Detail

      • values

        public static MySqlConnectorConfig.SnapshotLockingMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MySqlConnectorConfig.SnapshotLockingMode c : MySqlConnectorConfig.SnapshotLockingMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MySqlConnectorConfig.SnapshotLockingMode valueOf​(String name)
        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 name
        NullPointerException - if the argument is null
      • usesMinimalLocking

        public boolean usesMinimalLocking()
      • usesLocking

        public boolean usesLocking()
      • flushResetsIsolationLevel

        public boolean flushResetsIsolationLevel()
      • getLockStatement

        public String getLockStatement()
        Determine which flavour of MySQL locking to use.
        Returns:
        the correct SQL to obtain a global lock for the current mode
      • parse

        public static MySqlConnectorConfig.SnapshotLockingMode parse​(String value)
        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

        public static MySqlConnectorConfig.SnapshotLockingMode parse​(String value,
                                                                     String defaultValue)
        Determine if the supplied value is one of the predefined options.
        Parameters:
        value - the configuration property value; may not be null
        defaultValue - the default value; may be null
        Returns:
        the matching option, or null if no match is found and the non-null default is invalid