public class MockSourceTask extends SourceTask
SourceTask.TransactionBoundarycontext, TRANSACTION_BOUNDARY_CONFIG| Constructor and Description |
|---|
MockSourceTask() |
| Modifier and Type | Method and Description |
|---|---|
List<SourceRecord> |
poll()
Poll this source task for new records.
|
void |
start(Map<String,String> config)
Start the Task.
|
void |
stop()
Signal this SourceTask to stop.
|
String |
version()
Get the version of this task.
|
commit, commitRecord, commitRecord, initializepublic String version()
TaskConnector class's version.public void start(Map<String,String> config)
SourceTaskstart in interface Taskstart in class SourceTaskconfig - initial configurationpublic List<SourceRecord> poll()
SourceTasknull) in
order for the task to transition to the PAUSED state if requested to do so.
The task will be stopped on a separate thread, and when that happens
this method is expected to unblock, quickly finish up any remaining processing, and
return.
poll in class SourceTaskpublic void stop()
SourceTaskSourceTask.poll() and
SourceTask.commit().
For example, if a task uses a Selector to receive data over the network, this method
could set a flag that will force SourceTask.poll() to exit immediately and invoke
wakeup() to interrupt any ongoing requests.
stop in interface Taskstop in class SourceTask