public static interface EmbeddedEngine.Builder
EmbeddedEngine instances.| Modifier and Type | Method and Description |
|---|---|
EmbeddedEngine |
build()
Build a new connector with the information previously supplied to this builder.
|
EmbeddedEngine.Builder |
notifying(Consumer<org.apache.kafka.connect.source.SourceRecord> consumer)
Call the specified function for every
data change event read from the source database. |
EmbeddedEngine.Builder |
using(ClassLoader classLoader)
Use the specified class loader to find all necessary classes.
|
EmbeddedEngine.Builder |
using(Clock clock)
Use the specified clock when needing to determine the current time.
|
EmbeddedEngine.Builder |
using(Configuration config)
Use the specified configuration for the connector.
|
EmbeddedEngine.Builder |
using(EmbeddedEngine.CompletionCallback completionCallback)
When the engine's
EmbeddedEngine.run() method completes, call the supplied function with the results. |
EmbeddedEngine.Builder |
using(EmbeddedEngine.ConnectorCallback connectorCallback)
During the engine's
EmbeddedEngine.run() method, call the supplied the supplied function at different
stages according to the completion state of each component running within the engine (connectors, tasks etc) |
EmbeddedEngine.Builder |
using(OffsetCommitPolicy policy)
During the engine's
EmbeddedEngine.run() method, decide when the offsets
should be committed into the OffsetBackingStore. |
EmbeddedEngine.Builder notifying(Consumer<org.apache.kafka.connect.source.SourceRecord> consumer)
data change event read from the source database.
This method must be called with a non-null consumer.consumer - the consumer functionEmbeddedEngine.Builder using(Configuration config)
config - the configurationEmbeddedEngine.Builder using(ClassLoader classLoader)
null or not calling this method
results in the connector using this class's class loader.classLoader - the class loaderEmbeddedEngine.Builder using(Clock clock)
null or not calling this
method results in the connector using the system clock.clock - the clockEmbeddedEngine.Builder using(EmbeddedEngine.CompletionCallback completionCallback)
EmbeddedEngine.run() method completes, call the supplied function with the results.completionCallback - the callback function; may be null if errors should be written to the logEmbeddedEngine.Builder using(EmbeddedEngine.ConnectorCallback connectorCallback)
EmbeddedEngine.run() method, call the supplied the supplied function at different
stages according to the completion state of each component running within the engine (connectors, tasks etc)connectorCallback - the callback function; may be nullEmbeddedEngine.Builder using(OffsetCommitPolicy policy)
EmbeddedEngine.run() method, decide when the offsets
should be committed into the OffsetBackingStore.policy - EmbeddedEngine build()
IllegalArgumentException - if a configuration or consumer function were not supplied before this method is calledCopyright © 2018 JBoss by Red Hat. All rights reserved.