Table of Contents

Interface IConsumer<K, V, TJVMK, TJVMV>

Namespace
MASES.KNet.Consumer
Assembly
MASES.KNet.dll

KNet extension of IConsumer<K, V>

public interface IConsumer<K, V, TJVMK, TJVMV> : IConsumer<TJVMK, TJVMV>, IConsumer, IJVMBridgeBase, IJVMBridgeDefinition, IDisposable, ICloseable, IAutoCloseable

Type Parameters

K

The key type

V

The value type

TJVMK

The JVM type of K

TJVMV

The JVM type of V

Inherited Members
IJVMBridgeBase.MonitorEnter()
IJVMBridgeBase.MonitorExit()
IJVMBridgeBase.IsInstanceOf(IJavaType)
IJVMBridgeBase.IsInstanceOf<T>()
IJVMBridgeBase.RuntimeIsInstanceOf<T>()
IJVMBridgeBase.CastTo<TNewClass>()
IJVMBridgeBase.CastDirect<TNewClass>()
IJVMBridgeBase.DynBridgeInstance
IJVMBridgeBase.BridgeInstance
IJVMBridgeDefinition.BridgeClassName
IJVMBridgeDefinition.IsBridgeInterface
IJVMBridgeDefinition.IsBridgeAbstract
IJVMBridgeDefinition.IsBridgeStatic
IJVMBridgeDefinition.IsBridgeCloseable
IJVMBridgeDefinition.IsBridgeListener
Extension Methods

Properties

IsCompleting

true if the IConsumer<K, V, TJVMK, TJVMV> instance is completing async operation

bool IsCompleting { get; }

Property Value

bool

IsEmpty

true if the IConsumer<K, V, TJVMK, TJVMV> instance has an empty set of items in async operation

bool IsEmpty { get; }

Property Value

bool

WaitingMessages

Number of messages in the IConsumer<K, V, TJVMK, TJVMV> instance waiting to be processed in async operation

int WaitingMessages { get; }

Property Value

int

Methods

Consume(long, Action<ConsumerRecord<K, V, TJVMK, TJVMV>>)

KNet sync extension for Poll(Duration)

void Consume(long timeoutMs, Action<ConsumerRecord<K, V, TJVMK, TJVMV>> callback)

Parameters

timeoutMs long

Timeout in milliseconds

callback Action<ConsumerRecord<K, V, TJVMK, TJVMV>>

The Action<T> where receives ConsumerRecord<K, V, TJVMK, TJVMV>

ConsumeAsync(long)

KNet async extension for Poll(Duration)

bool ConsumeAsync(long timeoutMs)

Parameters

timeoutMs long

Timeout in milliseconds

Returns

bool

true if something was enqued for Async operations

Poll(long)

KNet extension for Poll(Duration)

ConsumerRecords<K, V, TJVMK, TJVMV> Poll(long timeoutMs)

Parameters

timeoutMs long

Timeout in milliseconds

Returns

ConsumerRecords<K, V, TJVMK, TJVMV>

ConsumerRecords<K, V, TJVMK, TJVMV>

Poll(TimeSpan)

KNet extension for Poll(Duration)

ConsumerRecords<K, V, TJVMK, TJVMV> Poll(TimeSpan timeout)

Parameters

timeout TimeSpan

Timeout expressed as TimeSpan

Returns

ConsumerRecords<K, V, TJVMK, TJVMV>

ConsumerRecords<K, V, TJVMK, TJVMV>

SetCallback(Action<ConsumerRecord<K, V, TJVMK, TJVMV>>)

Sets the Action<T> to use to receive ConsumerRecord<K, V, TJVMK, TJVMV>

void SetCallback(Action<ConsumerRecord<K, V, TJVMK, TJVMV>> cb)

Parameters

cb Action<ConsumerRecord<K, V, TJVMK, TJVMV>>

The callback Action<T>