public class SqlServerSnapshotChangeEventSource extends RelationalSnapshotChangeEventSource
| Modifier and Type | Class and Description |
|---|---|
private static class |
SqlServerSnapshotChangeEventSource.SqlServerSnapshotContext
Mutable context which is populated in the course of snapshotting.
|
RelationalSnapshotChangeEventSource.RelationalSnapshotContextAbstractSnapshotChangeEventSource.SnapshotContext, AbstractSnapshotChangeEventSource.SnapshottingTaskChangeEventSource.ChangeEventSourceContext| Modifier and Type | Field and Description |
|---|---|
private SqlServerConnectorConfig |
connectorConfig |
private SqlServerConnection |
jdbcConnection |
private static org.slf4j.Logger |
LOGGER |
private static int |
TRANSACTION_SNAPSHOT
Code 4096 corresponds to SNAPSHOT isolation level, which is not a part of the standard but SQL Server specific.
|
clock| Constructor and Description |
|---|
SqlServerSnapshotChangeEventSource(SqlServerConnectorConfig connectorConfig,
SqlServerOffsetContext previousOffset,
SqlServerConnection jdbcConnection,
SqlServerDatabaseSchema schema,
EventDispatcher<TableId> dispatcher,
Clock clock,
SnapshotProgressListener snapshotProgressListener) |
doExecute, getChangeRecordEmitter, getClockdelaySnapshotIfNeeded, executeprivate static final org.slf4j.Logger LOGGER
private static final int TRANSACTION_SNAPSHOT
private final SqlServerConnectorConfig connectorConfig
private final SqlServerConnection jdbcConnection
public SqlServerSnapshotChangeEventSource(SqlServerConnectorConfig connectorConfig, SqlServerOffsetContext previousOffset, SqlServerConnection jdbcConnection, SqlServerDatabaseSchema schema, EventDispatcher<TableId> dispatcher, Clock clock, SnapshotProgressListener snapshotProgressListener)
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 RelationalSnapshotChangeEventSourceExceptionprotected 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 RelationalSnapshotChangeEventSourcetableId - the table to generate a query forprotected Object getColumnValue(ResultSet rs, int columnIndex, Column column) throws SQLException
getColumnValue in class RelationalSnapshotChangeEventSourceSQLExceptionCopyright © 2020 JBoss by Red Hat. All rights reserved.