org.apache.ignite.stream.kafka.connect

## Class IgniteSourceTask

- java.lang.Object
- - org.apache.kafka.connect.source.SourceTask
  - - org.apache.ignite.stream.kafka.connect.IgniteSourceTask

- All Implemented Interfaces:
    org.apache.kafka.connect.connector.Task

      public class IgniteSourceTask
      extends org.apache.kafka.connect.source.SourceTask

  Task to consume remote cluster cache events from the grid and inject them into Kafka.

  Note that a task will create a bounded queue in the grid for more reliable data transfer. Queue size can be changed by `IgniteSourceConstants.INTL_BUF_SIZE`.

- - ### Field Summary

    - ### Fields inherited from class org.apache.kafka.connect.source.SourceTask

      `context`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IgniteSourceTask()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<org.apache.kafka.connect.source.SourceRecord>` | `poll()`
    `protected static void` | `setStopped(boolean stopped)` Used by unit test to avoid restart node and valid state of the `stopped` flag.
    `void` | `start(Map<String,String> props)` Filtering is done remotely.
    `void` | `stop()` Stops the grid client.
    `protected void` | `stopRemoteListen()` Stops the remote listener.
    `String` | `version()`

    - ### Methods inherited from class org.apache.kafka.connect.source.SourceTask

      `commit, commitRecord, initialize`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### IgniteSourceTask

          public IgniteSourceTask()

  - ### Method Detail

    - #### version

          public String version()

    - #### start

          public void start(Map<String,String> props)

      Filtering is done remotely. Local listener buffers data for injection into Kafka.
      Specified by:
        `start` in interface `org.apache.kafka.connect.connector.Task`
      Specified by:
        `start` in class `org.apache.kafka.connect.source.SourceTask`
      Parameters:
        `props` - Task properties.

    - #### poll

          public List<org.apache.kafka.connect.source.SourceRecord> poll()
                                                                  throws InterruptedException

      Specified by:
        `poll` in class `org.apache.kafka.connect.source.SourceTask`
      Throws:
        `InterruptedException`

    - #### stop

          public void stop()

      Stops the grid client.
      Specified by:
        `stop` in interface `org.apache.kafka.connect.connector.Task`
      Specified by:
        `stop` in class `org.apache.kafka.connect.source.SourceTask`

    - #### stopRemoteListen

          protected void stopRemoteListen()

      Stops the remote listener.

    - #### setStopped

          protected static void setStopped(boolean stopped)

      Used by unit test to avoid restart node and valid state of the `stopped` flag.
      Parameters:
        `stopped` - Stopped flag.

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020