public class PostgresOffsetContext extends Object implements OffsetContext
| Modifier and Type | Class and Description |
|---|---|
static class |
PostgresOffsetContext.Loader |
| Modifier and Type | Field and Description |
|---|---|
static String |
LAST_COMPLETELY_PROCESSED_LSN_KEY |
private Long |
lastCompletelyProcessedLsn |
private boolean |
lastSnapshotRecord |
private static org.slf4j.Logger |
LOGGER |
private Map<String,String> |
partition |
private static String |
SERVER_PARTITION_KEY |
private SourceInfo |
sourceInfo |
private org.apache.kafka.connect.data.Schema |
sourceInfoSchema |
| Modifier | Constructor and Description |
|---|---|
private |
PostgresOffsetContext(PostgresConnectorConfig connectorConfig,
Long lsn,
Long lastCompletelyProcessedLsn,
Long txId,
Instant time,
boolean snapshot,
boolean lastSnapshotRecord) |
private static final org.slf4j.Logger LOGGER
private static final String SERVER_PARTITION_KEY
public static final String LAST_COMPLETELY_PROCESSED_LSN_KEY
private final org.apache.kafka.connect.data.Schema sourceInfoSchema
private final SourceInfo sourceInfo
private boolean lastSnapshotRecord
private Long lastCompletelyProcessedLsn
private PostgresOffsetContext(PostgresConnectorConfig connectorConfig, Long lsn, Long lastCompletelyProcessedLsn, Long txId, Instant time, boolean snapshot, boolean lastSnapshotRecord)
public Map<String,?> getPartition()
getPartition in interface OffsetContextpublic Map<String,?> getOffset()
getOffset in interface OffsetContextpublic org.apache.kafka.connect.data.Schema getSourceInfoSchema()
getSourceInfoSchema in interface OffsetContextpublic org.apache.kafka.connect.data.Struct getSourceInfo()
getSourceInfo in interface OffsetContextpublic boolean isSnapshotRunning()
isSnapshotRunning in interface OffsetContextpublic void preSnapshotStart()
preSnapshotStart in interface OffsetContextpublic void preSnapshotCompletion()
preSnapshotCompletion in interface OffsetContextpublic void postSnapshotCompletion()
postSnapshotCompletion in interface OffsetContextpublic void updateWalPosition(Long lsn, Long lastCompletelyProcessedLsn, Instant commitTime, Long txId, TableId tableId, Long xmin)
boolean hasLastKnownPosition()
boolean hasCompletelyProcessedPosition()
Long lsn()
Long lastCompletelyProcessedLsn()
Long xmin()
public static PostgresOffsetContext initialContext(PostgresConnectorConfig connectorConfig, PostgresConnection jdbcConnection, Clock clock)
public OffsetState asOffsetState()
public void markLastSnapshotRecord()
markLastSnapshotRecord in interface OffsetContextpublic void event(DataCollectionId tableId, Instant instant)
event in interface OffsetContextCopyright © 2019 JBoss by Red Hat. All rights reserved.