public class MockConnector extends Connector
At the moment, this connector only supports a single task and shares configuration between the connector and its tasks.
MockSinkConnector
,
MockSourceConnector
Modifier and Type | Field and Description |
---|---|
static String |
CONNECTOR_FAILURE |
static long |
DEFAULT_FAILURE_DELAY_MS |
static String |
DELAY_MS_KEY |
static String |
MOCK_MODE_KEY |
static String |
TASK_FAILURE |
Constructor and Description |
---|
MockConnector() |
Modifier and Type | Method and Description |
---|---|
ConfigDef |
config()
Define the configuration for the connector.
|
void |
start(Map<String,String> config)
Start this Connector.
|
void |
stop()
Stop this connector.
|
Class<? extends Task> |
taskClass()
Returns the
Task implementation for this Connector. |
List<Map<String,String>> |
taskConfigs(int maxTasks)
Returns a set of configurations for Tasks based on the current configuration,
producing at most
maxTasks configurations. |
String |
version()
Get the version of this component.
|
context, initialize, initialize, reconfigure, validate
public static final String MOCK_MODE_KEY
public static final String DELAY_MS_KEY
public static final String CONNECTOR_FAILURE
public static final String TASK_FAILURE
public static final long DEFAULT_FAILURE_DELAY_MS
public String version()
Versioned
null
or empty.public void start(Map<String,String> config)
Connector
Connector.stop()
has been invoked.public Class<? extends Task> taskClass()
Connector
Task
implementation for this Connector.public List<Map<String,String>> taskConfigs(int maxTasks)
Connector
maxTasks
configurations.taskConfigs
in class Connector
maxTasks
- maximum number of configurations to generatepublic void stop()
Connector