Class StreamPartitioner<K, V>
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
-
JVMBridgeBaseJVMBridgeBase<JVMBridgeListener>JVMBridgeListenerStreamPartitioner<K, V>
- Implements
-
IJVMBridgeCoreIJVMBridgeBaseStaticIStreamPartitioner<K, V>IJVMBridgeBaseIJVMBridgeDefinition
- Derived
- Inherited Members
-
JVMBridgeListener.Dispose()JVMBridgeListener.AutoInitJVMBridgeListener.IsBridgeStaticJVMBridgeListener.IsBridgeCloseableJVMBridgeListener.IsBridgeListenerJVMBridgeBase<JVMBridgeListener>.IsAssignableFrom(IJavaType)JVMBridgeBase<JVMBridgeListener>.IsAssignableFrom<T>()JVMBridgeBase<JVMBridgeListener>.Execute<T>(params T[])JVMBridgeBase<JVMBridgeListener>.DynBridgeClazzJVMBridgeBase<JVMBridgeListener>.BridgeClazzJVMBridgeBase.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.IExecuteWithSignature<TNewClass, TReturn, TConverter>(string, string, params object[])JVMBridgeBase.DynBridgeInstanceJVMBridgeBase.BridgeInstanceJVMBridgeBase.IsBridgeInterfaceJVMBridgeBase.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
OnPartitions
public Func<String, K, V, int, Optional<Set<Integer>>> OnPartitions { get; set; }
Property Value
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
StringThe StreamPartitioner object
key
KThe StreamPartitioner object
value
VThe StreamPartitioner object
numPartitions
intThe 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
Returns
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
Returns
Remarks
The method invokes the default implementation in the JVM interface