Class OracleOffsetContext

java.lang.Object
io.debezium.pipeline.CommonOffsetContext<SourceInfo>
io.debezium.connector.oracle.OracleOffsetContext
All Implemented Interfaces:
OffsetContext

public class OracleOffsetContext extends CommonOffsetContext<SourceInfo>
  • Field Details

    • SNAPSHOT_COMPLETED_KEY

      public static final String SNAPSHOT_COMPLETED_KEY
      See Also:
    • SNAPSHOT_PENDING_TRANSACTIONS_KEY

      public static final String SNAPSHOT_PENDING_TRANSACTIONS_KEY
      See Also:
    • SNAPSHOT_SCN_KEY

      public static final String SNAPSHOT_SCN_KEY
      See Also:
    • sourceInfoSchema

      private final org.apache.kafka.connect.data.Schema sourceInfoSchema
    • transactionContext

      private final TransactionContext transactionContext
    • incrementalSnapshotContext

      private final IncrementalSnapshotContext<TableId> incrementalSnapshotContext
    • snapshotScn

      private final Scn snapshotScn
      SCN that was used for the initial consistent snapshot. We keep track of this field because it's a cutoff for emitting DDL statements, in case we start mining _before_ the snapshot SCN to cover transactions that were ongoing at the time the snapshot was taken.
    • snapshotPendingTransactions

      private Map<String,Scn> snapshotPendingTransactions
      Map of (txid, start SCN) for all transactions in progress at the time the snapshot was taken.
    • snapshotCompleted

      private boolean snapshotCompleted
      Whether a snapshot has been completed or not.
  • Constructor Details

  • Method Details

    • create

      public static OracleOffsetContext.Builder create()
    • getOffset

      public Map<String,?> getOffset()
    • getSourceInfoSchema

      public org.apache.kafka.connect.data.Schema getSourceInfoSchema()
    • setScn

      public void setScn(Scn scn)
    • setEventScn

      public void setEventScn(Scn eventScn)
    • getScn

      public Scn getScn()
    • getCommitScn

      public CommitScn getCommitScn()
    • getEventScn

      public Scn getEventScn()
    • setLcrPosition

      public void setLcrPosition(String lcrPosition)
    • getLcrPosition

      public String getLcrPosition()
    • getSnapshotScn

      public Scn getSnapshotScn()
    • getSnapshotPendingTransactions

      public Map<String,Scn> getSnapshotPendingTransactions()
    • setSnapshotPendingTransactions

      public void setSnapshotPendingTransactions(Map<String,Scn> snapshotPendingTransactions)
    • setTransactionId

      public void setTransactionId(String transactionId)
    • setUserName

      public void setUserName(String userName)
    • setSourceTime

      public void setSourceTime(Instant instant)
    • setTableId

      public void setTableId(TableId tableId)
    • getRedoThread

      public Integer getRedoThread()
    • setRedoThread

      public void setRedoThread(Integer redoThread)
    • setRsId

      public void setRsId(String rsId)
    • setSsn

      public void setSsn(int ssn)
    • isSnapshotRunning

      public boolean isSnapshotRunning()
    • preSnapshotStart

      public void preSnapshotStart()
    • preSnapshotCompletion

      public void preSnapshotCompletion()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • event

      public void event(io.debezium.spi.schema.DataCollectionId tableId, Instant timestamp)
    • tableEvent

      public void tableEvent(TableId tableId, Instant timestamp)
    • tableEvent

      public void tableEvent(Set<TableId> tableIds, Instant timestamp)
    • getTransactionContext

      public TransactionContext getTransactionContext()
    • getIncrementalSnapshotContext

      public IncrementalSnapshotContext<?> getIncrementalSnapshotContext()
    • getScnFromOffsetMapByKey

      public static Scn getScnFromOffsetMapByKey(Map<String,?> offset, String key)
      Helper method to resolve a Scn by key from the offset map.
      Parameters:
      offset - the offset map
      key - the entry key, either SourceInfo.SCN_KEY or SourceInfo.COMMIT_SCN_KEY.
      Returns:
      the Scn or null if not found
    • loadSnapshotPendingTransactions

      public static Map<String,Scn> loadSnapshotPendingTransactions(Map<String,?> offset)
      Helper method to read the in-progress transaction map from the offset map.
      Parameters:
      offset - the offset map
      Returns:
      the in-progress transaction map
    • loadSnapshotScn

      public static Scn loadSnapshotScn(Map<String,?> offset)
      Helper method to read the snapshot SCN from the offset map.
      Parameters:
      offset - the offset map
      Returns:
      the snapshot SCN