Package io.debezium.pipeline.source.spi
Class ChangeTableResultSet<C extends ChangeTable,T extends Comparable<T>>
- java.lang.Object
-
- io.debezium.pipeline.source.spi.ChangeTableResultSet<C,T>
-
- Type Parameters:
C- source connector implementation ofChangeTableT- source connector implementation of transaction log position
public abstract class ChangeTableResultSet<C extends ChangeTable,T extends Comparable<T>> extends Object
A wrapper around a JDBCResultSetfor a change table for processing rows.- Author:
- Jiri Pechanec, Chris Cranford
-
-
Field Summary
Fields Modifier and Type Field Description private CchangeTableprivate intcolumnDataOffsetprivate booleancompletedprivate TcurrentChangePositionprivate static org.slf4j.LoggerLOGGERprivate TpreviousChangePositionprivate ResultSetresultSet
-
Constructor Summary
Constructors Constructor Description ChangeTableResultSet(C changeTable, ResultSet resultSet, int columnDataOffset)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(ChangeTableResultSet<C,T> other)TgetChangePosition()CgetChangeTable()protected ObjectgetColumnData(ResultSet resultSet, int columnIndex)Get the value of a specific column in the result-set.Object[]getData()Get the column data from the source change table's result-setprotected abstract TgetNextChangePosition(ResultSet resultSet)intgetOperation()protected abstract intgetOperation(ResultSet resultSet)protected TgetPreviousChangePosition()booleanisCompleted()booleanisCurrentPositionSmallerThanPreviousPosition()booleannext()StringtoString()
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
changeTable
private final C extends ChangeTable changeTable
-
resultSet
private final ResultSet resultSet
-
columnDataOffset
private final int columnDataOffset
-
completed
private boolean completed
-
currentChangePosition
private T extends Comparable<T> currentChangePosition
-
previousChangePosition
private T extends Comparable<T> previousChangePosition
-
-
Method Detail
-
getChangeTable
public C getChangeTable()
-
getChangePosition
public T getChangePosition() throws SQLException
- Throws:
SQLException
-
getPreviousChangePosition
protected T getPreviousChangePosition()
-
getOperation
public int getOperation() throws SQLException- Throws:
SQLException
-
isCurrentPositionSmallerThanPreviousPosition
public boolean isCurrentPositionSmallerThanPreviousPosition()
-
next
public boolean next() throws SQLException- Throws:
SQLException
-
getData
public Object[] getData() throws SQLException
Get the column data from the source change table's result-set- Throws:
SQLException
-
getColumnData
protected Object getColumnData(ResultSet resultSet, int columnIndex) throws SQLException
Get the value of a specific column in the result-set.- Throws:
SQLException
-
isCompleted
public boolean isCompleted()
-
compareTo
public int compareTo(ChangeTableResultSet<C,T> other) throws SQLException
- Throws:
SQLException
-
getOperation
protected abstract int getOperation(ResultSet resultSet) throws SQLException
- Throws:
SQLException
-
getNextChangePosition
protected abstract T getNextChangePosition(ResultSet resultSet) throws SQLException
- Throws:
SQLException
-
-