public class PostgresConnectorTask extends BaseSourceTask
| Modifier and Type | Class and Description |
|---|---|
private static class |
PostgresConnectorTask.State |
| Modifier and Type | Field and Description |
|---|---|
private static String |
CONTEXT_NAME |
private ChangeEventSourceCoordinator |
coordinator |
private ErrorHandler |
errorHandler |
private PostgresConnection |
jdbcConnection |
private Map<String,?> |
lastOffset |
private static org.slf4j.Logger |
LOGGER |
private ChangeEventQueue<DataChangeEvent> |
queue |
private PostgresSchema |
schema |
private AtomicReference<PostgresConnectorTask.State> |
state |
private PostgresTaskContext |
taskContext |
| Constructor and Description |
|---|
PostgresConnectorTask() |
| Modifier and Type | Method and Description |
|---|---|
private void |
cleanupResources() |
void |
commit() |
ReplicationConnection |
createReplicationConnection(PostgresTaskContext taskContext,
boolean shouldExport,
int maxRetries,
Duration retryDelay) |
protected Iterable<Field> |
getAllConfigurationFields() |
PostgresTaskContext |
getTaskContext() |
List<org.apache.kafka.connect.source.SourceRecord> |
poll() |
void |
start(Configuration config) |
void |
stop() |
String |
version() |
getPreviousOffset, startprivate static final org.slf4j.Logger LOGGER
private static final String CONTEXT_NAME
private final AtomicReference<PostgresConnectorTask.State> state
private volatile PostgresTaskContext taskContext
private volatile ChangeEventQueue<DataChangeEvent> queue
private volatile PostgresConnection jdbcConnection
private volatile ChangeEventSourceCoordinator coordinator
private volatile ErrorHandler errorHandler
private volatile PostgresSchema schema
public void start(Configuration config)
start in class BaseSourceTaskpublic ReplicationConnection createReplicationConnection(PostgresTaskContext taskContext, boolean shouldExport, int maxRetries, Duration retryDelay) throws org.apache.kafka.connect.errors.ConnectException
org.apache.kafka.connect.errors.ConnectExceptionpublic void commit()
throws InterruptedException
commit in class org.apache.kafka.connect.source.SourceTaskInterruptedExceptionpublic List<org.apache.kafka.connect.source.SourceRecord> poll() throws InterruptedException
poll in class org.apache.kafka.connect.source.SourceTaskInterruptedExceptionpublic void stop()
stop in interface org.apache.kafka.connect.connector.Taskstop in class org.apache.kafka.connect.source.SourceTaskprivate void cleanupResources()
public String version()
protected Iterable<Field> getAllConfigurationFields()
getAllConfigurationFields in class BaseSourceTaskpublic PostgresTaskContext getTaskContext()
Copyright © 2019 JBoss by Red Hat. All rights reserved.