Table of Contents

Class StreamPartitioner<K, V, TJVMK, TJVMV>

Namespace
MASES.KNet.Streams.Processor
Assembly
MASES.KNet.dll

KNet implementation of StreamPartitioner<K, V>

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

Type Parameters

K

The key type

V

The value type

TJVMK

The JVM type of K

TJVMV

The JVM type of V

Inheritance
JVMBridgeBase
JVMBridgeBase<JVMBridgeListener>
JVMBridgeListener
StreamPartitioner<TJVMK, TJVMV>
StreamPartitioner<K, V, TJVMK, TJVMV>
Implements
IJVMBridgeCore
IJVMBridgeBaseStatic
IStreamPartitioner<TJVMK, TJVMV>
IJVMBridgeBase
IJVMBridgeDefinition
Derived
Inherited Members
JVMBridgeListener.Dispose()
JVMBridgeListener.BridgeClassName
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

Properties

Factory

Returns the current IGenericSerDesFactory

protected IGenericSerDesFactory Factory { get; }

Property Value

IGenericSerDesFactory

Key

The K content

public virtual K Key { get; }

Property Value

K

NumPartitions

The total number of partitions

public virtual int NumPartitions { get; }

Property Value

int

OnPartitions

public Func<StreamPartitioner<K, V, TJVMK, TJVMV>, ICollection<int?>> OnPartitions { get; set; }

Property Value

Func<StreamPartitioner<K, V, TJVMK, TJVMV>, ICollection<int?>>

Remarks

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

Topic

The topic name this record is sent to

public virtual string Topic { get; }

Property Value

string

Value

The V content

public virtual V Value { get; }

Property Value

V

Methods

Partitions()

public virtual ICollection<int?> Partitions()

Returns

ICollection<int?>

An Optional of Set of Integers between 0 and numPartitions-1, Empty optional means using default partitioner Optional of an empty set means the record won't be sent to any partitions i.e drop it. Optional of Set of integers means the partitions to which the record should be sent to.

Partitions(String, TJVMK, TJVMV, int)

public override Optional<Set<Integer>> Partitions(String arg0, TJVMK arg1, TJVMV arg2, int arg3)

Parameters

arg0 String

String

arg1 TJVMK

K

arg2 TJVMV

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