Table of Contents

Class KNetTask

Namespace
MASES.KNet.Connect
Assembly
MASES.KNet.dll

The generic class which is the base of both source or sink task

public abstract class KNetTask : IKNetTask, ITask, IKNetConnectLogging
Inheritance
KNetTask
Implements
Derived
Inherited Members

Properties

Connector

The associated IConnector

public IKNetConnector Connector { get; }

Property Value

IKNetConnector

IsDebugEnabled

Reports if debug level is enabled

public bool IsDebugEnabled { get; }

Property Value

bool

IsErrorEnabled

Reports if error level is enabled

public bool IsErrorEnabled { get; }

Property Value

bool

IsInfoEnabled

Reports if info level is enabled

public bool IsInfoEnabled { get; }

Property Value

bool

IsTraceEnabled

Reports if trace level is enabled

public bool IsTraceEnabled { get; }

Property Value

bool

IsWarnEnabled

Reports if warning level is enabled

public bool IsWarnEnabled { get; }

Property Value

bool

Properties

The properties retrieved from StartInternal()

public IReadOnlyDictionary<string, string> Properties { get; }

Property Value

IReadOnlyDictionary<string, string>

ReflectedTaskClassName

The unique name used to map objects between JVM and .NET

public abstract string ReflectedTaskClassName { get; }

Property Value

string

TaskId

The id received during initialization

public long TaskId { get; }

Property Value

long

Methods

Context<T>()

An helper function to read the data from Java side

protected T Context<T>()

Returns

T

The T

Type Parameters

T

The expected return Type

Exceptions

InvalidOperationException

DataToExchange(object)

An helper function to read the data from Java side

protected void DataToExchange(object data)

Parameters

data object

Exceptions

InvalidOperationException

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

InvalidOperationException

ExecuteOnTask(string, params object[])

An helper function to read the data from Java side

protected void ExecuteOnTask(string method, params object[] args)

Parameters

method string

Method name to be invoked

args object[]

Arguments of the method to be invoked

Exceptions

InvalidOperationException

ExecuteOnTask<T>(string, params object[])

An helper function to read the data from Java side

protected T ExecuteOnTask<T>(string method, params object[] args)

Parameters

method string

Method name to be invoked

args object[]

Arguments of the method to be invoked

Returns

T

The T

Type Parameters

T

The expected return Type

Exceptions

InvalidOperationException

LogDebug(string)

Write a debug

public void LogDebug(string var1)

Parameters

var1 string

String to write

LogDebug(string, JVMBridgeException)

Write a debug

public void LogDebug(string var1, JVMBridgeException var2)

Parameters

var1 string

String to write

var2 JVMBridgeException

Associated MASES.JCOBridge.C2JBridge.JVMBridgeException

LogError(string)

Write a error

public void LogError(string var1)

Parameters

var1 string

String to write

LogError(string, JVMBridgeException)

Write a error

public void LogError(string var1, JVMBridgeException var2)

Parameters

var1 string

String to write

var2 JVMBridgeException

Associated MASES.JCOBridge.C2JBridge.JVMBridgeException

LogInfo(string)

Write a info

public void LogInfo(string var1)

Parameters

var1 string

String to write

LogInfo(string, JVMBridgeException)

Write a info

public void LogInfo(string var1, JVMBridgeException var2)

Parameters

var1 string

String to write

var2 JVMBridgeException

Associated MASES.JCOBridge.C2JBridge.JVMBridgeException

LogTrace(string)

Write a trace

public void LogTrace(string var1)

Parameters

var1 string

String to write

LogTrace(string, JVMBridgeException)

Write a trace

public void LogTrace(string var1, JVMBridgeException var2)

Parameters

var1 string

String to write

var2 JVMBridgeException

Associated MASES.JCOBridge.C2JBridge.JVMBridgeException

LogWarn(string)

Write a warning

public void LogWarn(string var1)

Parameters

var1 string

String to write

LogWarn(string, JVMBridgeException)

Write a warning

public void LogWarn(string var1, JVMBridgeException var2)

Parameters

var1 string

String to write

var2 JVMBridgeException

Associated MASES.JCOBridge.C2JBridge.JVMBridgeException

Start(Map<String, String>)

Not implemented

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

Parameters

props Map<String, String>

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 info from TaskConfigs(int, IDictionary<string, string>).

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()

Version()

Implement the method to execute the version action

public abstract string Version()

Returns

string

VersionInternal()

Public method used from Java to trigger Version()

public object VersionInternal()

Returns

object