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.SnapshotContext, RelationalSnapshotChangeEventSource.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) |
execute, getChangeRecordEmitter, getClock, getColumnValueprivate 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 RelationalSnapshotChangeEventSource.SnapshottingTask getSnapshottingTask(OffsetContext previousOffset)
getSnapshottingTask in class RelationalSnapshotChangeEventSourceprotected RelationalSnapshotChangeEventSource.SnapshotContext prepare(ChangeEventSource.ChangeEventSourceContext context) throws Exception
prepare in class RelationalSnapshotChangeEventSourceExceptionprotected void connectionCreated(RelationalSnapshotChangeEventSource.SnapshotContext snapshotContext) throws Exception
connectionCreated in class RelationalSnapshotChangeEventSourceExceptionprotected Set<TableId> getAllTableIds(RelationalSnapshotChangeEventSource.SnapshotContext ctx) throws Exception
getAllTableIds in class RelationalSnapshotChangeEventSourceExceptionprotected void lockTablesForSchemaSnapshot(ChangeEventSource.ChangeEventSourceContext sourceContext, RelationalSnapshotChangeEventSource.SnapshotContext snapshotContext) throws SQLException, InterruptedException
lockTablesForSchemaSnapshot in class RelationalSnapshotChangeEventSourceSQLExceptionInterruptedExceptionprotected void releaseSchemaSnapshotLocks(RelationalSnapshotChangeEventSource.SnapshotContext snapshotContext) throws SQLException
releaseSchemaSnapshotLocks in class RelationalSnapshotChangeEventSourceSQLExceptionprotected void determineSnapshotOffset(RelationalSnapshotChangeEventSource.SnapshotContext ctx) throws Exception
determineSnapshotOffset in class RelationalSnapshotChangeEventSourceExceptionprotected void readTableStructure(ChangeEventSource.ChangeEventSourceContext sourceContext, RelationalSnapshotChangeEventSource.SnapshotContext snapshotContext) throws SQLException, InterruptedException
readTableStructure in class RelationalSnapshotChangeEventSourceSQLExceptionInterruptedExceptionprotected SchemaChangeEvent getCreateTableEvent(RelationalSnapshotChangeEventSource.SnapshotContext snapshotContext, Table table) throws SQLException
getCreateTableEvent in class RelationalSnapshotChangeEventSourceSQLExceptionprotected void complete(RelationalSnapshotChangeEventSource.SnapshotContext snapshotContext)
complete in class RelationalSnapshotChangeEventSourceprotected Optional<String> getSnapshotSelect(RelationalSnapshotChangeEventSource.SnapshotContext snapshotContext, TableId tableId)
getSnapshotSelect in class RelationalSnapshotChangeEventSourcetableId - the table to generate a query forCopyright © 2019 JBoss by Red Hat. All rights reserved.