Class DefaultJdbcCustomization
- java.lang.Object
-
- com.github.kagkarlsson.scheduler.jdbc.DefaultJdbcCustomization
-
- All Implemented Interfaces:
JdbcCustomization
- Direct Known Subclasses:
MariaDBJdbcCustomization,MssqlJdbcCustomization,MySQL8JdbcCustomization,MySQLJdbcCustomization,OracleJdbcCustomization,PostgreSqlJdbcCustomization
public class DefaultJdbcCustomization extends Object implements JdbcCustomization
-
-
Constructor Summary
Constructors Constructor Description DefaultJdbcCustomization(boolean persistTimestampInUTC)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcreateGenericSelectForUpdateQuery(String tableName, int limit, String requiredAndCondition)StringcreateSelectDueQuery(String tableName, int limit, String andCondition)InstantgetInstant(ResultSet rs, String columnName)StringgetName()StringgetQueryLimitPart(int limit)byte[]getTaskData(ResultSet rs, String columnName)List<Execution>lockAndFetchSingleStatement(JdbcTaskRepositoryContext ctx, Instant now, int limit)voidsetInstant(PreparedStatement p, int index, Instant value)voidsetTaskData(PreparedStatement p, int index, byte[] value)booleansupportsExplicitQueryLimitPart()booleansupportsGenericLockAndFetch()booleansupportsSingleStatementLockAndFetch()
-
-
-
Field Detail
-
UTC
public static final Calendar UTC
-
-
Method Detail
-
setInstant
public void setInstant(PreparedStatement p, int index, Instant value) throws SQLException
- Specified by:
setInstantin interfaceJdbcCustomization- Throws:
SQLException
-
getInstant
public Instant getInstant(ResultSet rs, String columnName) throws SQLException
- Specified by:
getInstantin interfaceJdbcCustomization- Throws:
SQLException
-
setTaskData
public void setTaskData(PreparedStatement p, int index, byte[] value) throws SQLException
- Specified by:
setTaskDatain interfaceJdbcCustomization- Throws:
SQLException
-
getTaskData
public byte[] getTaskData(ResultSet rs, String columnName) throws SQLException
- Specified by:
getTaskDatain interfaceJdbcCustomization- Throws:
SQLException
-
supportsExplicitQueryLimitPart
public boolean supportsExplicitQueryLimitPart()
- Specified by:
supportsExplicitQueryLimitPartin interfaceJdbcCustomization
-
getQueryLimitPart
public String getQueryLimitPart(int limit)
- Specified by:
getQueryLimitPartin interfaceJdbcCustomization
-
supportsSingleStatementLockAndFetch
public boolean supportsSingleStatementLockAndFetch()
- Specified by:
supportsSingleStatementLockAndFetchin interfaceJdbcCustomization
-
lockAndFetchSingleStatement
public List<Execution> lockAndFetchSingleStatement(JdbcTaskRepositoryContext ctx, Instant now, int limit)
- Specified by:
lockAndFetchSingleStatementin interfaceJdbcCustomization
-
supportsGenericLockAndFetch
public boolean supportsGenericLockAndFetch()
- Specified by:
supportsGenericLockAndFetchin interfaceJdbcCustomization
-
createGenericSelectForUpdateQuery
public String createGenericSelectForUpdateQuery(String tableName, int limit, String requiredAndCondition)
- Specified by:
createGenericSelectForUpdateQueryin interfaceJdbcCustomization
-
createSelectDueQuery
public String createSelectDueQuery(String tableName, int limit, String andCondition)
- Specified by:
createSelectDueQueryin interfaceJdbcCustomization
-
getName
public String getName()
- Specified by:
getNamein interfaceJdbcCustomization
-
-