Package org.apache.flink.connector.jdbc
Class JdbcExactlyOnceOptions
- java.lang.Object
-
- org.apache.flink.connector.jdbc.JdbcExactlyOnceOptions
-
- All Implemented Interfaces:
Serializable
@PublicEvolving public class JdbcExactlyOnceOptions extends Object implements Serializable
JDBC exactly once sink options.maxCommitAttempts - maximum number of commit attempts to make per transaction; must be > 0; state size is proportional to the product of max number of in-flight snapshots and this number.
allowOutOfOrderCommits - If true, all prepared transactions will be attempted to commit regardless of any transient failures during this operation. This may lead to inconsistency. Default: false.
recoveredAndRollback - whether to rollback prepared transactions known to XA RM on startup (after committing known transactions, i.e. restored from state).
NOTE that setting this parameter to true may:
- interfere with other subtasks or applications (one subtask rolling back transactions prepared by the other one (and known to it))
- block when using with some non-MVCC databases, if there are ended-not-prepared transactions
See also
XaFacade.recover()- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJdbcExactlyOnceOptions.JDBCExactlyOnceOptionsBuilderJDBCExactlyOnceOptionsBuilder.
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_TRANSACTION_PER_CONNECTION
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JdbcExactlyOnceOptions.JDBCExactlyOnceOptionsBuilderbuilder()static JdbcExactlyOnceOptionsdefaults()intgetMaxCommitAttempts()IntegergetTimeoutSec()booleanisAllowOutOfOrderCommits()booleanisDiscoverAndRollbackOnRecovery()booleanisTransactionPerConnection()
-
-
-
Field Detail
-
DEFAULT_TRANSACTION_PER_CONNECTION
public static final boolean DEFAULT_TRANSACTION_PER_CONNECTION
- See Also:
- Constant Field Values
-
-
Method Detail
-
defaults
public static JdbcExactlyOnceOptions defaults()
-
isDiscoverAndRollbackOnRecovery
public boolean isDiscoverAndRollbackOnRecovery()
-
isAllowOutOfOrderCommits
public boolean isAllowOutOfOrderCommits()
-
getMaxCommitAttempts
public int getMaxCommitAttempts()
-
getTimeoutSec
public Integer getTimeoutSec()
-
isTransactionPerConnection
public boolean isTransactionPerConnection()
-
builder
public static JdbcExactlyOnceOptions.JDBCExactlyOnceOptionsBuilder builder()
-
-