Class LogMinerEventRow
- java.lang.Object
-
- io.debezium.connector.oracle.logminer.events.LogMinerEventRow
-
-
Field Summary
Fields Modifier and Type Field Description private static intCHANGE_TIMEprivate InstantchangeTimeprivate static intCSFprivate EventTypeeventTypeprivate longhashprivate static intHASHprivate static org.slf4j.LoggerLOGGERprivate Stringoperationprivate static intOPERATIONprivate static intOPERATION_CODEprivate StringredoSqlprivate static intROLLBACK_FLAGprivate booleanrollbackFlagprivate static LogMinerEventRowrowUsed by calls tofromResultSet(ResultSet, String, boolean)to return the same instance but initialized with values from each row without creating multiple objects repeatedly during the result-set iteration.private static intROW_IDprivate StringrowIdprivate static intRS_IDprivate StringrsIdprivate Scnscnprivate static intSCNprivate static intSQL_REDOprivate static intTABLE_NAMEprivate TableIdtableIdprivate StringtableNameprivate static intTABLESPACE_NAMEprivate StringtablespaceNameprivate StringtransactionIdprivate static intTX_IDprivate StringuserNameprivate static intUSERNAMEprivate static CalendarUTC_CALENDAR
-
Constructor Summary
Constructors Constructor Description LogMinerEventRow()
-
Method Summary
-
-
-
Field Detail
-
LOGGER
private static final org.slf4j.Logger LOGGER
-
UTC_CALENDAR
private static final Calendar UTC_CALENDAR
-
row
private static final LogMinerEventRow row
Used by calls tofromResultSet(ResultSet, String, boolean)to return the same instance but initialized with values from each row without creating multiple objects repeatedly during the result-set iteration.
-
SCN
private static final int SCN
- See Also:
- Constant Field Values
-
SQL_REDO
private static final int SQL_REDO
- See Also:
- Constant Field Values
-
OPERATION_CODE
private static final int OPERATION_CODE
- See Also:
- Constant Field Values
-
CHANGE_TIME
private static final int CHANGE_TIME
- See Also:
- Constant Field Values
-
TX_ID
private static final int TX_ID
- See Also:
- Constant Field Values
-
CSF
private static final int CSF
- See Also:
- Constant Field Values
-
TABLE_NAME
private static final int TABLE_NAME
- See Also:
- Constant Field Values
-
TABLESPACE_NAME
private static final int TABLESPACE_NAME
- See Also:
- Constant Field Values
-
OPERATION
private static final int OPERATION
- See Also:
- Constant Field Values
-
USERNAME
private static final int USERNAME
- See Also:
- Constant Field Values
-
ROW_ID
private static final int ROW_ID
- See Also:
- Constant Field Values
-
ROLLBACK_FLAG
private static final int ROLLBACK_FLAG
- See Also:
- Constant Field Values
-
RS_ID
private static final int RS_ID
- See Also:
- Constant Field Values
-
HASH
private static final int HASH
- See Also:
- Constant Field Values
-
scn
private Scn scn
-
tableId
private TableId tableId
-
tableName
private String tableName
-
tablespaceName
private String tablespaceName
-
eventType
private EventType eventType
-
changeTime
private Instant changeTime
-
transactionId
private String transactionId
-
operation
private String operation
-
userName
private String userName
-
rowId
private String rowId
-
rollbackFlag
private boolean rollbackFlag
-
rsId
private String rsId
-
hash
private long hash
-
redoSql
private String redoSql
-
-
Method Detail
-
getScn
public Scn getScn()
-
getTableId
public TableId getTableId()
-
getTableName
public String getTableName()
-
getTablespaceName
public String getTablespaceName()
-
getEventType
public EventType getEventType()
-
getChangeTime
public Instant getChangeTime()
-
getTransactionId
public String getTransactionId()
-
getOperation
public String getOperation()
-
getUserName
public String getUserName()
-
getRowId
public String getRowId()
-
isRollbackFlag
public boolean isRollbackFlag()
-
getRsId
public String getRsId()
-
getHash
public long getHash()
-
getRedoSql
public String getRedoSql()
-
fromResultSet
public static LogMinerEventRow fromResultSet(ResultSet resultSet, String catalogName, boolean isTxIdRawValue) throws SQLException
Returns aLogMinerEventRowinstance based on the current row of the JDBCResultSet. It's important to note that the instance returned by this method is never created as a new instance. The method uses an internal single instance that is initialized based on the values from the current row of the JDBC result-set to avoid creating lots of intermediate objects.- Parameters:
resultSet- the result set to be read, should never benullcatalogName- the catalog name, should never benullisTxIdRawValue- whether the transaction id should be read as a raw value or not- Returns:
- a populated instance of a LogMinerEventRow object.
- Throws:
SQLException- if there was a problem reading the result set
-
initializeFromResultSet
private void initializeFromResultSet(ResultSet resultSet, String catalogName, boolean isTxIdRawValue) throws SQLException
Initializes the instance from the JDBCResultSet.- Parameters:
resultSet- the result set to be read, should never benullcatalogName- the catalog name, should never benullisTxIdRawValue- whether the transaction id should be read as a raw value or not- Throws:
SQLException- if there was a problem reading the result set
-
reset
private void reset()
Resets the internal state of the instance
-
getTransactionId
private String getTransactionId(ResultSet rs, boolean asRawValue) throws SQLException
- Throws:
SQLException
-
getChangeTime
private Instant getChangeTime(ResultSet rs) throws SQLException
- Throws:
SQLException
-
getScn
private Scn getScn(ResultSet rs) throws SQLException
- Throws:
SQLException
-
getSqlRedo
private String getSqlRedo(ResultSet rs) throws SQLException
- Throws:
SQLException
-
-