Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement 11 #34

Merged
merged 5 commits into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/java/kafkabridge/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<name>mases.kafkabridge</name>
<description>Apache Kafka interface bridging implementation</description>
<url>https://github.com/masesgroup/KafkaBridge</url>
<version>1.1.8.0</version>
<version>1.1.9.0</version>

<licenses>
<license>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;

namespace MASES.KafkaBridge.Clients.Admin
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Common.Quota;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;
using MASES.KafkaBridge.Java.Util;

namespace MASES.KafkaBridge.Clients.Admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Common.Config;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;
using MASES.KafkaBridge.Java.Util;

namespace MASES.KafkaBridge.Clients.Admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;

namespace MASES.KafkaBridge.Clients.Admin
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;
using MASES.KafkaBridge.Java.Util;

namespace MASES.KafkaBridge.Clients.Admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;
using MASES.KafkaBridge.Java.Util;

namespace MASES.KafkaBridge.Clients.Admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;
using MASES.KafkaBridge.Java.Util;

namespace MASES.KafkaBridge.Clients.Admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Common.Acl;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;
using MASES.KafkaBridge.Java.Util;

namespace MASES.KafkaBridge.Clients.Admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;
using MASES.KafkaBridge.Java.Util;

namespace MASES.KafkaBridge.Clients.Admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;
using MASES.KafkaBridge.Java.Util;

namespace MASES.KafkaBridge.Clients.Admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;

namespace MASES.KafkaBridge.Clients.Admin
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;
using MASES.KafkaBridge.Java.Util;

namespace MASES.KafkaBridge.Clients.Admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;
using MASES.KafkaBridge.Java.Util;

namespace MASES.KafkaBridge.Clients.Admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;
using MASES.KafkaBridge.Java.Util;

namespace MASES.KafkaBridge.Clients.Admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;
using MASES.KafkaBridge.Java.Util;

namespace MASES.KafkaBridge.Clients.Admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;
using MASES.KafkaBridge.Java.Util;

namespace MASES.KafkaBridge.Clients.Admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;

namespace MASES.KafkaBridge.Clients.Admin
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;

namespace MASES.KafkaBridge.Clients.Admin
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

using MASES.KafkaBridge.Common;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;
using MASES.KafkaBridge.Java.Util;

namespace MASES.KafkaBridge.Clients.Admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ public interface IConsumerRebalanceListener : IJVMBridgeBase
}

/// <summary>
/// Listener for Kafka ConsumerRebalanceListener. Extends <see cref="CLRListener"/>, implements <see cref="IConsumerRebalanceListener"/>
/// Listener for Kafka ConsumerRebalanceListener. Extends <see cref="JVMBridgeListener"/>, implements <see cref="IConsumerRebalanceListener"/>
/// </summary>
/// <remarks>Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object</remarks>
public class ConsumerRebalanceListener : CLRListener, IConsumerRebalanceListener
public class ConsumerRebalanceListener : JVMBridgeListener, IConsumerRebalanceListener
{
/// <inheritdoc cref="CLRListener.ClassName"/>
/// <inheritdoc cref="JVMBridgeListener.ClassName"/>
public sealed override string ClassName => "org.mases.kafkabridge.clients.consumer.ConsumerRebalanceListenerImpl";

readonly Action<Collection<TopicPartition>> revokedFunction = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ public interface IOffsetCommitCallback : IJVMBridgeBase
}

/// <summary>
/// Listener for Kafka OffsetCommitCallback. Extends <see cref="CLRListener"/>, implements <see cref="IOffsetCommitCallback"/>
/// Listener for Kafka OffsetCommitCallback. Extends <see cref="JVMBridgeListener"/>, implements <see cref="IOffsetCommitCallback"/>
/// </summary>
/// <remarks>Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object</remarks>
public class OffsetCommitCallback : CLRListener, IOffsetCommitCallback
public class OffsetCommitCallback : JVMBridgeListener, IOffsetCommitCallback
{
/// <inheritdoc cref="CLRListener.ClassName"/>
/// <inheritdoc cref="JVMBridgeListener.ClassName"/>
public sealed override string ClassName => "org.mases.kafkabridge.clients.consumer.OffsetCommitCallbackImpl";

readonly Action<Map<TopicPartition, OffsetAndMetadata>, JVMBridgeException> executionFunction = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ public interface ICallback : IJVMBridgeBase
}

/// <summary>
/// Listener for Kafka Callback. Extends <see cref="CLRListener"/>, implements <see cref="ICallback"/>
/// Listener for Kafka Callback. Extends <see cref="JVMBridgeListener"/>, implements <see cref="ICallback"/>
/// </summary>
/// <remarks>Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object</remarks>
public class Callback : CLRListener, ICallback
public class Callback : JVMBridgeListener, ICallback
{
/// <inheritdoc cref="CLRListener.ClassName"/>
/// <inheritdoc cref="JVMBridgeListener.ClassName"/>
public sealed override string ClassName => "org.mases.kafkabridge.clients.producer.CallbackImpl";

readonly Action<RecordMetadata, JVMBridgeException> executionFunction = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Refer to LICENSE for more information.
*/

using MASES.KafkaBridge.Java.Lang;
using Java.Lang;
using MASES.KafkaBridge.Java.Util.Concurrent;

namespace MASES.KafkaBridge.Common
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ public interface IDeserializer<E> : IDeserializer
/// </summary>
/// <typeparam name="E">The data associated to the event</typeparam>
/// <remarks>Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object</remarks>
public class Deserializer<E> : CLRListener, IDeserializer<E>
public class Deserializer<E> : JVMBridgeListener, IDeserializer<E>
{
/// <inheritdoc cref="CLRListener.ClassName"/>
/// <inheritdoc cref="JVMBridgeListener.ClassName"/>
public override string ClassName => "org.mases.kafkabridge.clients.common.serialization.DeserializerImpl";

readonly Func<string, byte[], E> deserialize = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
*/

using MASES.KafkaBridge.Common.Utils;
using MASES.KafkaBridge.Java.Lang;
using Java.Lang;
using MASES.KafkaBridge.Java.Util;

namespace MASES.KafkaBridge.Common.Serialization
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ public interface ISerializer<E> : ISerializer
byte[] SerializeWithHeaders(string topic, Headers headers, E data);
}
/// <summary>
/// Listener for Kafka Serializer. Extends <see cref="CLRListener"/>. Implements <see cref="ISerializer{E}"/>
/// Listener for Kafka Serializer. Extends <see cref="JVMBridgeListener"/>. Implements <see cref="ISerializer{E}"/>
/// </summary>
/// <typeparam name="E">The data associated to the event</typeparam>
/// <remarks>Remember to Dispose the object otherwise there is a resource leak, the object contains a reference to the the corresponding JVM object</remarks>
public class Serializer<E> : CLRListener, ISerializer<E>
public class Serializer<E> : JVMBridgeListener, ISerializer<E>
{
/// <inheritdoc cref="CLRListener.ClassName"/>
/// <inheritdoc cref="JVMBridgeListener.ClassName"/>
public override string ClassName => "org.mases.kafkabridge.clients.common.serialization.SerializerImpl";

readonly Func<string, E, byte[]> serialize = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Refer to LICENSE for more information.
*/

using MASES.KafkaBridge.Java.Lang;
using Java.Lang;

namespace MASES.KafkaBridge.Common.Serialization
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Refer to LICENSE for more information.
*/

using MASES.KafkaBridge.Java.Lang;
using Java.Lang;

namespace MASES.KafkaBridge.Common.Serialization
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
* Refer to LICENSE for more information.
*/

using Java.Util.Function;
using MASES.JCOBridge.C2JBridge;
using MASES.JCOBridge.C2JBridge.Function;

namespace MASES.KafkaBridge.Common.Utils
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

using MASES.KafkaBridge.Java.Util;
using JavaLang = Java.Lang;

namespace MASES.KafkaBridge.Connect.Data
{
Expand All @@ -30,12 +31,12 @@ public ConnectSchema()
{
}

public ConnectSchema(Type type, bool optional, Java.Lang.Object defaultValue, string name, int version, string doc, Map<string, string> parameters, List<Field> fields, Schema keySchema, Schema valueSchema)
public ConnectSchema(Type type, bool optional, JavaLang.Object defaultValue, string name, int version, string doc, Map<string, string> parameters, List<Field> fields, Schema keySchema, Schema valueSchema)
: base(type, optional, defaultValue, name, version, doc, parameters, fields, keySchema, valueSchema)
{
}

public ConnectSchema(Type type, bool optional, Java.Lang.Object defaultValue, string name, int version, string doc)
public ConnectSchema(Type type, bool optional, JavaLang.Object defaultValue, string name, int version, string doc)
:this(type, optional, defaultValue, name, version, doc, null, null, null, null)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

using MASES.JCOBridge.C2JBridge;
using MASES.KafkaBridge.Java.Util;
using JavaLang = Java.Lang;

namespace MASES.KafkaBridge.Connect.Data
{
Expand Down Expand Up @@ -91,7 +92,7 @@ public interface ISchema : IJVMBridgeBase

bool IsOptional { get; }

Java.Lang.Object DefaultValue();
JavaLang.Object DefaultValue();

string Name();

Expand Down Expand Up @@ -131,7 +132,7 @@ public Schema(params object[] args)

public bool IsOptional => IExecute<bool>("isOptional");

public Java.Lang.Object DefaultValue() { return IExecute<Java.Lang.Object>("defaultValue"); }
public JavaLang.Object DefaultValue() { return IExecute<JavaLang.Object>("defaultValue"); }

public string Name() { return IExecute<string>("name"); }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

using MASES.JCOBridge.C2JBridge;
using JavaLang = Java.Lang;

namespace MASES.KafkaBridge.Connect.Data
{
Expand All @@ -30,13 +31,13 @@ public SchemaAndValue()
{
}

public SchemaAndValue(Schema schema, Java.Lang.Object value)
public SchemaAndValue(Schema schema, JavaLang.Object value)
:base(schema, value)
{
}

public Schema Schema => IExecute<Schema>("schema");

public Java.Lang.Object Value => IExecute<Java.Lang.Object>("value");
public JavaLang.Object Value => IExecute<JavaLang.Object>("value");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@
*/

using MASES.JCOBridge.C2JBridge;
using JavaLang = Java.Lang;

namespace MASES.KafkaBridge.Connect.Data
{
public class SchemaProjector : JVMBridgeBase<SchemaProjector>
{
public override string ClassName => "org.apache.kafka.connect.data.SchemaProjector";

public static Java.Lang.Object Project(Schema source, Java.Lang.Object record, Schema target)
public static JavaLang.Object Project(Schema source, JavaLang.Object record, Schema target)
{
return SExecute<Java.Lang.Object>("project", source, record, target);
return SExecute<JavaLang.Object>("project", source, record, target);
}
}
}
Loading