Table of Contents

Class StreamPartitioner<K, V>

Namespace
Org.Apache.Kafka.Streams.Processor
Assembly
MASES.KNet.dll

Listener for Kafka StreamPartitioner. Extends MASES.JCOBridge.C2JBridge.JVMBridgeListener, implements IStreamPartitioner<K, V>

public class StreamPartitioner<K, V> : JVMBridgeListener, IDynamicMetaObjectProvider, IJVMBridgeCore, IDisposable, IJVMBridgeBaseStatic, IStreamPartitioner<K, V>, IJVMBridgeBase, IJVMBridgeDefinition

Type Parameters

K
V
Inheritance
JVMBridgeBase
JVMBridgeBase<JVMBridgeListener>
JVMBridgeListener
StreamPartitioner<K, V>
Implements
IJVMBridgeCore
IJVMBridgeBaseStatic
IJVMBridgeBase
IJVMBridgeDefinition
Derived
Inherited Members
JVMBridgeListener.Dispose()
JVMBridgeListener.AutoInit
JVMBridgeListener.IsBridgeStatic
JVMBridgeListener.IsBridgeCloseable
JVMBridgeListener.IsBridgeListener
JVMBridgeBase<JVMBridgeListener>.IsAssignableFrom(IJavaType)
JVMBridgeBase<JVMBridgeListener>.IsAssignableFrom<T>()
JVMBridgeBase<JVMBridgeListener>.Execute<T>(params T[])
JVMBridgeBase<JVMBridgeListener>.DynBridgeClazz
JVMBridgeBase<JVMBridgeListener>.BridgeClazz
JVMBridgeBase.RuntimeClassNameOf<T>()
JVMBridgeBase.ClassNameOf<T>()
JVMBridgeBase.ClassOf<T>()
JVMBridgeBase.WrapsDirect<TNewClass>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass, TReturn>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass, TReturn, TConverter>(IJavaObject)
JVMBridgeBase.MonitorEnter()
JVMBridgeBase.MonitorExit()
JVMBridgeBase.IsInstanceOf(IJavaType)
JVMBridgeBase.IsInstanceOf<T>()
JVMBridgeBase.RuntimeIsInstanceOf<T>()
JVMBridgeBase.CastTo<TNewClass>()
JVMBridgeBase.CastDirect<TNewClass>()
JVMBridgeBase.ToString()
JVMBridgeBase.GetHashCode()
JVMBridgeBase.Notify()
JVMBridgeBase.NotifyAll()
JVMBridgeBase.Wait()
JVMBridgeBase.DynBridgeInstance
JVMBridgeBase.BridgeInstance
JVMBridgeBase.IsBridgeInterface
JVMBridgeBase.IsBridgeAbstract

Remarks

Dispose the object to avoid a resource leak, the object contains a reference to the corresponding JVM object

Constructors

StreamPartitioner()

Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge

public StreamPartitioner()

Properties

BridgeClassName

public override string BridgeClassName { get; }

Property Value

string

OnPartitions

public Func<String, K, V, int, Optional<Set<Integer>>> OnPartitions { get; set; }

Property Value

Func<String, K, V, int, Optional<Set<Integer>>>

Remarks

If OnPartitions has a value it takes precedence over corresponding class method

Methods

InitializeHandlers()

Handlers initializer for StreamPartitioner

protected virtual void InitializeHandlers()

Partition(String, K, V, int)

Executes the StreamPartitioner action in the CLR

public virtual int Partition(String topic, K key, V value, int numPartitions)

Parameters

topic String

The StreamPartitioner object

key K

The StreamPartitioner object

value V

The StreamPartitioner object

numPartitions int

The StreamPartitioner object

Returns

int

an integer between 0 and numPartitions -1, or -1 if the default partitioning logic should be used

Partitions(String, K, V, int)

public virtual Optional<Set<Integer>> Partitions(String arg0, K arg1, V arg2, int arg3)

Parameters

arg0 String

String

arg1 K

K

arg2 V

V

arg3 int

int

Returns

Optional<Set<Integer>>

Optional

Remarks

The method invokes the default implementation in the JVM interface using PartitionsDefault(String, K, V, int); override the method to implement a different behavior

PartitionsDefault(String, K, V, int)

public Optional<Set<Integer>> PartitionsDefault(String arg0, K arg1, V arg2, int arg3)

Parameters

arg0 String

String

arg1 K

K

arg2 V

V

arg3 int

int

Returns

Optional<Set<Integer>>

Optional

Remarks

The method invokes the default implementation in the JVM interface