@ThreadSafe public class PostgresTaskContext extends Object
PostgresConnectorTask. This deals with most of the brunt of reading various configuration options
and creating other objects with these various options.| Modifier and Type | Field and Description |
|---|---|
private Clock |
clock |
private PostgresConnectorConfig |
config |
private PostgresSchema |
schema |
private Throwable |
taskFailure |
private TopicSelector |
topicSelector |
| Modifier | Constructor and Description |
|---|---|
protected |
PostgresTaskContext(PostgresConnectorConfig config,
PostgresSchema schema) |
| Modifier and Type | Method and Description |
|---|---|
protected Clock |
clock() |
protected PostgresConnectorConfig |
config() |
protected LoggingContext.PreviousContext |
configureLoggingContext(String contextName)
Configure the logger's Mapped Diagnostic Context (MDC) properties for the thread making this call.
|
protected PostgresConnection |
createConnection() |
protected ReplicationConnection |
createReplicationConnection() |
(package private) void |
failTask(Throwable taskFailure) |
(package private) Throwable |
getTaskFailure() |
private TopicSelector |
initTopicSelector() |
protected void |
refreshSchema(boolean printReplicaIdentityInfo) |
protected PostgresSchema |
schema() |
protected TopicSelector |
topicSelector() |
private final PostgresConnectorConfig config
private final Clock clock
private final TopicSelector topicSelector
private final PostgresSchema schema
private volatile Throwable taskFailure
protected PostgresTaskContext(PostgresConnectorConfig config, PostgresSchema schema)
private TopicSelector initTopicSelector()
protected Clock clock()
protected TopicSelector topicSelector()
protected PostgresSchema schema()
protected PostgresConnectorConfig config()
protected void refreshSchema(boolean printReplicaIdentityInfo)
throws SQLException
SQLExceptionprotected ReplicationConnection createReplicationConnection() throws SQLException
SQLExceptionprotected PostgresConnection createConnection()
protected LoggingContext.PreviousContext configureLoggingContext(String contextName)
contextName - the name of the context; may not be nullIllegalArgumentException - if contextName is nullThrowable getTaskFailure()
void failTask(Throwable taskFailure)
Copyright © 2017 JBoss by Red Hat. All rights reserved.