Class KNetConnector
The generic class which is the base of both source or sink connectors
public abstract class KNetConnector : IKNetConnector, IConnector, IVersion, IKNetConnectLogging
- Inheritance
-
KNetConnector
- Implements
- Derived
- Inherited Members
Constructors
KNetConnector()
Initializer
public KNetConnector()
Fields
taskDictionary
The set of allocated KNetTask with their associated identifiers
protected ConcurrentDictionary<long, KNetTask> taskDictionary
Field Value
Properties
ConnectorName
The unique name of the connector
public abstract string ConnectorName { get; }
Property Value
IsDebugEnabled
Reports if debug level is enabled
public bool IsDebugEnabled { get; }
Property Value
IsErrorEnabled
Reports if error level is enabled
public bool IsErrorEnabled { get; }
Property Value
IsInfoEnabled
Reports if info level is enabled
public bool IsInfoEnabled { get; }
Property Value
IsTraceEnabled
Reports if trace level is enabled
public bool IsTraceEnabled { get; }
Property Value
IsWarnEnabled
Reports if warning level is enabled
public bool IsWarnEnabled { get; }
Property Value
Properties
The properties retrieved from StartInternal()
public IReadOnlyDictionary<string, string> Properties { get; }
Property Value
ReflectedConnectorClassName
The unique name used to map objects between JVM and .NET
public abstract string ReflectedConnectorClassName { get; }
Property Value
TaskClassType
public abstract Type TaskClassType { get; }
Property Value
Methods
AllocateTask(long)
Allocates a task object based on KNetTask
public object AllocateTask(long taskId)
Parameters
taskId
longThe unique id generated from JAva side
Returns
- object
The local .NET object
Config()
Not implemented
public ConfigDef Config()
Returns
Exceptions
- NotImplementedException
Invoked in Java before any initialization
Context<T>()
An helper function to read context data from Java side
protected T Context<T>()
Returns
- T
The
T
Type Parameters
T
The expected return Type
Exceptions
DataToExchange(object)
An helper function to read the data from Java side
protected void DataToExchange(object data)
Parameters
data
object
Exceptions
DataToExchange<T>()
An helper function to read the data from Java side
protected T DataToExchange<T>()
Returns
- T
The
T
Type Parameters
T
The expected return Type
Exceptions
ExecuteOnConnector(string, params object[])
An helper function to read the data from Java side
protected void ExecuteOnConnector(string method, params object[] args)
Parameters
Exceptions
ExecuteOnConnector<T>(string, params object[])
An helper function to read the data from Java side
protected T ExecuteOnConnector<T>(string method, params object[] args)
Parameters
Returns
- T
The
T
Type Parameters
T
The expected return Type
Exceptions
Initialize(ConnectorContext)
Not implemented
public void Initialize(ConnectorContext ctx)
Parameters
ctx
ConnectorContext
Exceptions
- NotImplementedException
Invoked in Java before any initialization
Initialize(ConnectorContext, List<Map<String, String>>)
Not implemented
public void Initialize(ConnectorContext ctx, List<Map<String, String>> taskConfigs)
Parameters
ctx
ConnectorContexttaskConfigs
List<Map<String, String>>
Exceptions
- NotImplementedException
Invoked in Java before any initialization
LogDebug(string)
Write a debug
public void LogDebug(string var1)
Parameters
var1
stringString to write
LogDebug(string, JVMBridgeException)
Write a debug
public void LogDebug(string var1, JVMBridgeException var2)
Parameters
var1
stringString to write
var2
JVMBridgeExceptionAssociated MASES.JCOBridge.C2JBridge.JVMBridgeException
LogError(string)
Write a error
public void LogError(string var1)
Parameters
var1
stringString to write
LogError(string, JVMBridgeException)
Write a error
public void LogError(string var1, JVMBridgeException var2)
Parameters
var1
stringString to write
var2
JVMBridgeExceptionAssociated MASES.JCOBridge.C2JBridge.JVMBridgeException
LogInfo(string)
Write a info
public void LogInfo(string var1)
Parameters
var1
stringString to write
LogInfo(string, JVMBridgeException)
Write a info
public void LogInfo(string var1, JVMBridgeException var2)
Parameters
var1
stringString to write
var2
JVMBridgeExceptionAssociated MASES.JCOBridge.C2JBridge.JVMBridgeException
LogTrace(string)
Write a trace
public void LogTrace(string var1)
Parameters
var1
stringString to write
LogTrace(string, JVMBridgeException)
Write a trace
public void LogTrace(string var1, JVMBridgeException var2)
Parameters
var1
stringString to write
var2
JVMBridgeExceptionAssociated MASES.JCOBridge.C2JBridge.JVMBridgeException
LogWarn(string)
Write a warning
public void LogWarn(string var1)
Parameters
var1
stringString to write
LogWarn(string, JVMBridgeException)
Write a warning
public void LogWarn(string var1, JVMBridgeException var2)
Parameters
var1
stringString to write
var2
JVMBridgeExceptionAssociated MASES.JCOBridge.C2JBridge.JVMBridgeException
Reconfigure(Map<String, String>)
Not implemented
public void Reconfigure(Map<String, String> props)
Parameters
Exceptions
Start(Map<String, String>)
Not implemented
public void Start(Map<String, String> props)
Parameters
Exceptions
- NotImplementedException
Local version with a different signature
Start(IReadOnlyDictionary<string, string>)
Implement the method to execute the start action
public abstract void Start(IReadOnlyDictionary<string, string> props)
Parameters
props
IReadOnlyDictionary<string, string>The set of properties returned from Apache Kafka Connect framework: the IReadOnlyDictionary<TKey, TValue> contains the same info from configuration file.
StartInternal()
Public method used from Java to trigger Start(Map<String, String>)
public void StartInternal()
Stop()
Implement the method to execute the stop action
public abstract void Stop()
StopInternal()
Public method used from Java to trigger Stop()
public void StopInternal()
TaskClass()
Not implemented
public Class TaskClass()
Returns
Exceptions
- NotImplementedException
Invoked in Java before any initialization
TaskConfigs(int)
Not implemented
public List<Map<String, String>> TaskConfigs(int maxTasks)
Parameters
maxTasks
int
Returns
Exceptions
- NotImplementedException
Invoked using the other signature
TaskConfigs(int, IDictionary<string, string>)
Invoked during allocation of tasks from Apache Kafka Connect
public abstract void TaskConfigs(int index, IDictionary<string, string> config)
Parameters
index
intThe actual index
config
IDictionary<string, string>The IDictionary<TKey, TValue> to be filled in with properties for the task: the same will be received from Start(IReadOnlyDictionary<string, string>)
TaskConfigsInternal(int)
Public method used from Java to trigger TaskConfigs(int, IDictionary<string, string>)
public void TaskConfigsInternal(int index)
Parameters
index
int
Validate(Map<String, String>)
Not implemented
public Config Validate(Map<String, String> connectorConfigs)
Parameters
Returns
Exceptions
- NotImplementedException
Invoked in Java before any initialization
Version()
Not implemented
public string Version()
Returns
Exceptions
- NotImplementedException
Invoked in Java before any initialization