|Constructor and Description|
|Modifier and Type||Method and Description|
Signals whether the connector implementation is capable of defining the transaction boundaries for a connector with the given configuration.
Returns the context object used to interact with the Kafka Connect runtime.
Signals whether the connector supports exactly-once semantics with a proposed configuration.
config, initialize, initialize, reconfigure, start, stop, taskClass, taskConfigs, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected SourceConnectorContext context()
public ExactlyOnceSupport exactlyOnceSupport(Map<String,String> connectorConfig)
For backwards compatibility, the default implementation will return
null, but connector authors are
strongly encouraged to override this method to return a non-null value such as
validate, this method may be called by the runtime before the
start method is invoked when the connector will be run with exactly-once support.
connectorConfig- the configuration that will be used for the connector.
ExactlyOnceSupport.SUPPORTEDif the connector can provide exactly-once support with the given configuration, and
ExactlyOnceSupport.UNSUPPORTEDif it cannot. If this method is overridden by a connector, should not be
null, but if
null, it will be assumed that the connector cannot provide exactly-once semantics.
public ConnectorTransactionBoundaries canDefineTransactionBoundaries(Map<String,String> connectorConfig)
Connector.start(Map), only when the runtime supports exactly-once and the connector configuration includes
This method need not be implemented if the connector implementation does not support defining transaction boundaries.
connectorConfig- the configuration that will be used for the connector
ConnectorTransactionBoundaries.SUPPORTEDif the connector will define its own transaction boundaries, or
ConnectorTransactionBoundaries.UNSUPPORTEDotherwise; may never be
null. The default implementation returns