public class SqlServerOffsetContext extends Object implements OffsetContext
| Modifier and Type | Class and Description |
|---|---|
static class |
SqlServerOffsetContext.Loader |
| Modifier and Type | Field and Description |
|---|---|
private long |
eventSerialNo
The index of the current event within the current transaction.
|
private Map<String,String> |
partition |
private static String |
SERVER_PARTITION_KEY |
private static String |
SNAPSHOT_COMPLETED_KEY |
private boolean |
snapshotCompleted |
private SourceInfo |
sourceInfo |
private org.apache.kafka.connect.data.Schema |
sourceInfoSchema |
private TransactionContext |
transactionContext |
| Constructor and Description |
|---|
SqlServerOffsetContext(SqlServerConnectorConfig connectorConfig,
TxLogPosition position,
boolean snapshot,
boolean snapshotCompleted) |
SqlServerOffsetContext(SqlServerConnectorConfig connectorConfig,
TxLogPosition position,
boolean snapshot,
boolean snapshotCompleted,
long eventSerialNo,
TransactionContext transactionContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
event(DataCollectionId tableId,
Instant timestamp) |
TxLogPosition |
getChangePosition() |
long |
getEventSerialNo() |
Map<String,?> |
getOffset() |
Map<String,?> |
getPartition() |
org.apache.kafka.connect.data.Struct |
getSourceInfo() |
org.apache.kafka.connect.data.Schema |
getSourceInfoSchema() |
TransactionContext |
getTransactionContext() |
boolean |
isSnapshotCompleted() |
boolean |
isSnapshotRunning() |
void |
markLastSnapshotRecord() |
void |
postSnapshotCompletion() |
void |
preSnapshotCompletion() |
void |
preSnapshotStart() |
void |
setChangePosition(TxLogPosition position,
int eventCount) |
String |
toString() |
private static final String SERVER_PARTITION_KEY
private static final String SNAPSHOT_COMPLETED_KEY
private final org.apache.kafka.connect.data.Schema sourceInfoSchema
private final SourceInfo sourceInfo
private boolean snapshotCompleted
private final TransactionContext transactionContext
private long eventSerialNo
public SqlServerOffsetContext(SqlServerConnectorConfig connectorConfig, TxLogPosition position, boolean snapshot, boolean snapshotCompleted, long eventSerialNo, TransactionContext transactionContext)
public SqlServerOffsetContext(SqlServerConnectorConfig connectorConfig, TxLogPosition position, boolean snapshot, boolean snapshotCompleted)
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 TxLogPosition getChangePosition()
public long getEventSerialNo()
public void setChangePosition(TxLogPosition position, int eventCount)
public boolean isSnapshotRunning()
isSnapshotRunning in interface OffsetContextpublic boolean isSnapshotCompleted()
public void preSnapshotStart()
preSnapshotStart in interface OffsetContextpublic void preSnapshotCompletion()
preSnapshotCompletion in interface OffsetContextpublic void postSnapshotCompletion()
postSnapshotCompletion in interface OffsetContextpublic void markLastSnapshotRecord()
markLastSnapshotRecord in interface OffsetContextpublic void event(DataCollectionId tableId, Instant timestamp)
event in interface OffsetContextpublic TransactionContext getTransactionContext()
getTransactionContext in interface OffsetContextCopyright © 2020 JBoss by Red Hat. All rights reserved.