Package org.apache.beam.sdk.io.jdbc
Class JdbcIO.DefaultRetryStrategy
- java.lang.Object
-
- org.apache.beam.sdk.io.jdbc.JdbcIO.DefaultRetryStrategy
-
- All Implemented Interfaces:
java.io.Serializable,JdbcIO.RetryStrategy
- Enclosing class:
- JdbcIO
public static class JdbcIO.DefaultRetryStrategy extends java.lang.Object implements JdbcIO.RetryStrategy
This is the defaultPredicatewe use to detect DeadLock. It basically test if theSQLException.getSQLState()equals 40001 or 40P01. 40001 is the SQL State used by most of databases to identify deadlock, and 40P01 is specific to PostgreSQL (see PostgreSQL documentation).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultRetryStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapply(java.sql.SQLException e)
-
-
-
Method Detail
-
apply
public boolean apply(java.sql.SQLException e)
- Specified by:
applyin interfaceJdbcIO.RetryStrategy
-
-