public class PostgresSnapshotChangeEventSource extends RelationalSnapshotChangeEventSource
| Modifier and Type | Class and Description |
|---|---|
private static class |
PostgresSnapshotChangeEventSource.PostgresSnapshotContext
Mutable context which is populated in the course of snapshotting.
|
RelationalSnapshotChangeEventSource.RelationalSnapshotContextAbstractSnapshotChangeEventSource.SnapshotContext, AbstractSnapshotChangeEventSource.SnapshottingTaskChangeEventSource.ChangeEventSourceContext| Modifier and Type | Field and Description |
|---|---|
private PostgresConnectorConfig |
connectorConfig |
private PostgresConnection |
jdbcConnection |
private static org.slf4j.Logger |
LOGGER |
private PostgresSchema |
schema |
private SlotCreationResult |
slotCreatedInfo |
private Snapshotter |
snapshotter |
clock| Constructor and Description |
|---|
PostgresSnapshotChangeEventSource(PostgresConnectorConfig connectorConfig,
Snapshotter snapshotter,
PostgresOffsetContext previousOffset,
PostgresConnection jdbcConnection,
PostgresSchema schema,
EventDispatcher<TableId> dispatcher,
Clock clock,
SnapshotProgressListener snapshotProgressListener,
SlotCreationResult slotCreatedInfo) |
doExecute, getChangeRecordEmitter, getClockdelaySnapshotIfNeeded, executeprivate static final org.slf4j.Logger LOGGER
private final PostgresConnectorConfig connectorConfig
private final PostgresConnection jdbcConnection
private final PostgresSchema schema
private final Snapshotter snapshotter
private final SlotCreationResult slotCreatedInfo
public PostgresSnapshotChangeEventSource(PostgresConnectorConfig connectorConfig, Snapshotter snapshotter, PostgresOffsetContext previousOffset, PostgresConnection jdbcConnection, PostgresSchema schema, EventDispatcher<TableId> dispatcher, Clock clock, SnapshotProgressListener snapshotProgressListener, SlotCreationResult slotCreatedInfo)
protected AbstractSnapshotChangeEventSource.SnapshottingTask getSnapshottingTask(OffsetContext previousOffset)
getSnapshottingTask in class AbstractSnapshotChangeEventSourceprotected AbstractSnapshotChangeEventSource.SnapshotContext prepare(ChangeEventSource.ChangeEventSourceContext context) throws Exception
prepare in class AbstractSnapshotChangeEventSourceExceptionprotected void connectionCreated(RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext) throws Exception
connectionCreated in class RelationalSnapshotChangeEventSourceExceptionprotected Set<TableId> getAllTableIds(RelationalSnapshotChangeEventSource.RelationalSnapshotContext ctx) throws Exception
getAllTableIds in class RelationalSnapshotChangeEventSourceExceptionprotected void lockTablesForSchemaSnapshot(ChangeEventSource.ChangeEventSourceContext sourceContext, RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext) throws SQLException, InterruptedException
lockTablesForSchemaSnapshot in class RelationalSnapshotChangeEventSourceSQLExceptionInterruptedExceptionprotected void releaseSchemaSnapshotLocks(RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext) throws SQLException
releaseSchemaSnapshotLocks in class RelationalSnapshotChangeEventSourceSQLExceptionprotected void determineSnapshotOffset(RelationalSnapshotChangeEventSource.RelationalSnapshotContext ctx) throws Exception
determineSnapshotOffset in class RelationalSnapshotChangeEventSourceExceptionprivate long getTransactionStartLsn()
throws SQLException
SQLExceptionprotected void readTableStructure(ChangeEventSource.ChangeEventSourceContext sourceContext, RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext) throws SQLException, InterruptedException
readTableStructure in class RelationalSnapshotChangeEventSourceSQLExceptionInterruptedExceptionprotected SchemaChangeEvent getCreateTableEvent(RelationalSnapshotChangeEventSource.RelationalSnapshotContext snapshotContext, Table table) throws SQLException
getCreateTableEvent in class RelationalSnapshotChangeEventSourceSQLExceptionprotected void complete(AbstractSnapshotChangeEventSource.SnapshotContext snapshotContext)
complete in class RelationalSnapshotChangeEventSourceprotected Optional<String> getSnapshotSelect(AbstractSnapshotChangeEventSource.SnapshotContext snapshotContext, TableId tableId)
getSnapshotSelect in class RelationalSnapshotChangeEventSourceprotected Object getColumnValue(ResultSet rs, int columnIndex, Column column) throws SQLException
getColumnValue in class RelationalSnapshotChangeEventSourceSQLExceptionCopyright © 2020 JBoss by Red Hat. All rights reserved.