public final class MySqlTaskContext extends MySqlJdbcContext
MySqlConnector| Modifier and Type | Field and Description |
|---|---|
private Clock |
clock |
private MySqlSchema |
dbSchema |
private Predicate<String> |
gtidSourceFilter |
private RecordMakers |
recordProcessor |
private SourceInfo |
source |
private TopicSelector |
topicSelector |
config, FACTORY, jdbc, logger, MYSQL_CONNECTION_URL| Constructor and Description |
|---|
MySqlTaskContext(Configuration config) |
| Modifier and Type | Method and Description |
|---|---|
Clock |
clock() |
LoggingContext.PreviousContext |
configureLoggingContext(String contextName)
Configure the logger's Mapped Diagnostic Context (MDC) properties for the thread making this call.
|
MySqlSchema |
dbSchema() |
Predicate<String> |
gtidSourceFilter()
Get the predicate function that will return
true if a GTID source is to be included, or false if
a GTID source is to be excluded. |
boolean |
includeSchemaChangeRecords() |
void |
initializeHistory()
Initialize the database history with any server-specific information.
|
boolean |
isInitialSnapshotOnly() |
boolean |
isSnapshotAllowedWhenNeeded() |
boolean |
isSnapshotNeverAllowed() |
void |
loadHistory(SourceInfo startingPoint)
Load the database schema information using the previously-recorded history, and stop reading the history when the
the history reaches the supplied starting point.
|
RecordMakers |
makeRecord() |
int |
maxBatchSize() |
int |
maxQueueSize() |
long |
pollIntervalInMillseconds() |
long |
rowCountForLargeTable() |
long |
serverId() |
String |
serverName() |
void |
shutdown() |
protected MySqlConnectorConfig.SnapshotMode |
snapshotMode() |
SourceInfo |
source() |
void |
start() |
void |
temporaryLoggingContext(String contextName,
Runnable operation)
Run the supplied function in the temporary connector MDC context, and when complete always return the MDC context to its
state before this method was called.
|
long |
timeoutInMilliseconds() |
TopicSelector |
topicSelector() |
boolean |
useMinimalSnapshotLocking() |
close, config, connectionString, hostname, jdbc, logger, password, port, readMySqlCharsetSystemVariables, setStatementFor, setSystemProperty, sslMode, sslModeEnabled, usernameprivate final SourceInfo source
private final MySqlSchema dbSchema
private final TopicSelector topicSelector
private final RecordMakers recordProcessor
private final Clock clock
public MySqlTaskContext(Configuration config)
public TopicSelector topicSelector()
public SourceInfo source()
public MySqlSchema dbSchema()
public RecordMakers makeRecord()
public Predicate<String> gtidSourceFilter()
true if a GTID source is to be included, or false if
a GTID source is to be excluded.public void initializeHistory()
public void loadHistory(SourceInfo startingPoint)
startingPoint - the source information with the current SourceInfo.partition() and offset at which the database schemas are to reflect; may not be nullpublic Clock clock()
public long serverId()
public String serverName()
public int maxQueueSize()
public int maxBatchSize()
public long timeoutInMilliseconds()
public long pollIntervalInMillseconds()
public long rowCountForLargeTable()
public boolean includeSchemaChangeRecords()
public boolean isSnapshotAllowedWhenNeeded()
public boolean isSnapshotNeverAllowed()
public boolean isInitialSnapshotOnly()
protected MySqlConnectorConfig.SnapshotMode snapshotMode()
public boolean useMinimalSnapshotLocking()
public void start()
start in class MySqlJdbcContextpublic void shutdown()
shutdown in class MySqlJdbcContextpublic LoggingContext.PreviousContext configureLoggingContext(String contextName)
contextName - the name of the context; may not be nullIllegalArgumentException - if contextName is nullpublic void temporaryLoggingContext(String contextName, Runnable operation)
contextName - the name of the context; may not be nulloperation - the function to run in the new MDC context; may not be nullIllegalArgumentException - if any of the parameters are nullCopyright © 2016 JBoss by Red Hat. All rights reserved.