public class SqlServerSnapshotChangeEventSource extends HistorizedRelationalSnapshotChangeEventSource
| Modifier and Type | Class and Description |
|---|---|
private static class |
SqlServerSnapshotChangeEventSource.SqlServerSnapshotContext
Mutable context which is populated in the course of snapshotting.
|
HistorizedRelationalSnapshotChangeEventSource.SnapshotContext, HistorizedRelationalSnapshotChangeEventSource.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.
|
| Constructor and Description |
|---|
SqlServerSnapshotChangeEventSource(SqlServerConnectorConfig connectorConfig,
SqlServerOffsetContext previousOffset,
SqlServerConnection jdbcConnection,
SqlServerDatabaseSchema schema,
EventDispatcher<TableId> dispatcher,
Clock clock,
SnapshotProgressListener snapshotProgressListener) |
execute, getClockprivate 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 HistorizedRelationalSnapshotChangeEventSource.SnapshottingTask getSnapshottingTask(OffsetContext previousOffset)
getSnapshottingTask in class HistorizedRelationalSnapshotChangeEventSourceprotected HistorizedRelationalSnapshotChangeEventSource.SnapshotContext prepare(ChangeEventSource.ChangeEventSourceContext context) throws Exception
prepare in class HistorizedRelationalSnapshotChangeEventSourceExceptionprotected void connectionCreated(HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext) throws Exception
connectionCreated in class HistorizedRelationalSnapshotChangeEventSourceExceptionprotected Set<TableId> getAllTableIds(HistorizedRelationalSnapshotChangeEventSource.SnapshotContext ctx) throws Exception
getAllTableIds in class HistorizedRelationalSnapshotChangeEventSourceExceptionprotected void lockTablesForSchemaSnapshot(ChangeEventSource.ChangeEventSourceContext sourceContext, HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext) throws SQLException, InterruptedException
lockTablesForSchemaSnapshot in class HistorizedRelationalSnapshotChangeEventSourceSQLExceptionInterruptedExceptionprotected void releaseSchemaSnapshotLocks(HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext) throws SQLException
releaseSchemaSnapshotLocks in class HistorizedRelationalSnapshotChangeEventSourceSQLExceptionprotected void determineSnapshotOffset(HistorizedRelationalSnapshotChangeEventSource.SnapshotContext ctx) throws Exception
determineSnapshotOffset in class HistorizedRelationalSnapshotChangeEventSourceExceptionprotected void readTableStructure(ChangeEventSource.ChangeEventSourceContext sourceContext, HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext) throws SQLException, InterruptedException
readTableStructure in class HistorizedRelationalSnapshotChangeEventSourceSQLExceptionInterruptedExceptionprotected SchemaChangeEvent getCreateTableEvent(HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext, Table table) throws SQLException
getCreateTableEvent in class HistorizedRelationalSnapshotChangeEventSourceSQLExceptionprotected void complete(HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext)
complete in class HistorizedRelationalSnapshotChangeEventSourceprotected String getSnapshotSelect(HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext, TableId tableId)
getSnapshotSelect in class HistorizedRelationalSnapshotChangeEventSourcetableId - the table to generate a query forprotected ChangeRecordEmitter getChangeRecordEmitter(HistorizedRelationalSnapshotChangeEventSource.SnapshotContext snapshotContext, TableId tableId, Object[] row)
getChangeRecordEmitter in class HistorizedRelationalSnapshotChangeEventSourceCopyright © 2019 JBoss by Red Hat. All rights reserved.