Class MockProducer<K, V>
public class MockProducer<K, V> : Producer<K, V>, IDynamicMetaObjectProvider, IJVMBridgeCore, IJVMBridgeBaseStatic, IProducer<K, V>, IProducer, IJVMBridgeBase, IJVMBridgeDefinition, IDisposable, ICloseable, IAutoCloseable
Type Parameters
K
V
- Inheritance
-
JVMBridgeBaseJVMBridgeBase<AutoCloseable>Producer<K, V>MockProducer<K, V>
- Implements
-
IJVMBridgeCoreIJVMBridgeBaseStaticIProducer<K, V>IJVMBridgeBaseIJVMBridgeDefinition
- Inherited Members
-
JVMBridgeBase<AutoCloseable>.SExecuteWithSignature(Type, IJavaType, string, string, params object[])JVMBridgeBase<AutoCloseable>.SExecute<TReturn, TConverter>(Type, IJavaType, string, params object[])JVMBridgeBase<AutoCloseable>.IsAssignableFrom(IJavaType)JVMBridgeBase<AutoCloseable>.IsAssignableFrom<T>()JVMBridgeBase<AutoCloseable>.Execute<T>(params T[])JVMBridgeBase<AutoCloseable>.DynBridgeClazzJVMBridgeBase<AutoCloseable>.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.Dispose()JVMBridgeBase.ToString()JVMBridgeBase.GetHashCode()JVMBridgeBase.Notify()JVMBridgeBase.NotifyAll()JVMBridgeBase.Wait()JVMBridgeBase.IExecuteWithSignature<TNewClass, TReturn, TConverter>(string, string, params object[])JVMBridgeBase.DynBridgeInstanceJVMBridgeBase.BridgeInstanceJVMBridgeBase.IsBridgeListener
- Extension Methods
Constructors
MockProducer()
Default constructor: even if the corresponding Java class does not have one, it is mandatory for JCOBridge
public MockProducer()
MockProducer(Cluster, bool, Partitioner, Serializer<K>, Serializer<V>)
public MockProducer(Cluster arg0, bool arg1, Partitioner arg2, Serializer<K> arg3, Serializer<V> arg4)
Parameters
arg0
Clusterarg1
boolarg2
Partitionerarg3
Serializer<K>arg4
Serializer<V>
MockProducer(Cluster, bool, Serializer<K>, Serializer<V>)
public MockProducer(Cluster arg0, bool arg1, Serializer<K> arg2, Serializer<V> arg3)
Parameters
arg0
Clusterarg1
boolarg2
Serializer<K>arg3
Serializer<V>
MockProducer(bool, Partitioner, Serializer<K>, Serializer<V>)
public MockProducer(bool arg0, Partitioner arg1, Serializer<K> arg2, Serializer<V> arg3)
Parameters
arg0
boolarg1
Partitionerarg2
Serializer<K>arg3
Serializer<V>
MockProducer(bool, Serializer<K>, Serializer<V>)
public MockProducer(bool arg0, Serializer<K> arg1, Serializer<V> arg2)
Parameters
arg0
boolarg1
Serializer<K>arg2
Serializer<V>
MockProducer(params object[])
Generic constructor: it is useful for JCOBridge when there is a derived class which needs to pass arguments to the highest JVMBridgeBase class
public MockProducer(params object[] args)
Parameters
args
object[]
Properties
BridgeClassName
https://www.jcobridge.com/api-clr/html/P_MASES_JCOBridge_C2JBridge_JVMBridgeBase_BridgeClassName.htm
public override string BridgeClassName { get; }
Property Value
IsBridgeAbstract
public override bool IsBridgeAbstract { get; }
Property Value
IsBridgeCloseable
public override bool IsBridgeCloseable { get; }
Property Value
IsBridgeInterface
public override bool IsBridgeInterface { get; }
Property Value
IsBridgeStatic
public override bool IsBridgeStatic { get; }
Property Value
abortTransactionException
public RuntimeException abortTransactionException { get; set; }
Property Value
beginTransactionException
public RuntimeException beginTransactionException { get; set; }
Property Value
closeException
public RuntimeException closeException { get; set; }
Property Value
commitTransactionException
public RuntimeException commitTransactionException { get; set; }
Property Value
flushException
public RuntimeException flushException { get; set; }
Property Value
initTransactionException
public RuntimeException initTransactionException { get; set; }
Property Value
partitionsForException
public RuntimeException partitionsForException { get; set; }
Property Value
sendException
public RuntimeException sendException { get; set; }
Property Value
sendOffsetsToTransactionException
public RuntimeException sendOffsetsToTransactionException { get; set; }
Property Value
Methods
AbortTransaction()
public void AbortTransaction()
Exceptions
BeginTransaction()
public void BeginTransaction()
Exceptions
Clear()
public void Clear()
ClientInstanceId(Duration)
public Uuid ClientInstanceId(Duration arg0)
Parameters
Returns
Close()
public void Close()
Close(Duration)
public void Close(Duration arg0)
Parameters
Closed()
public bool Closed()
Returns
CommitCount()
public long CommitCount()
Returns
CommitTransaction()
public void CommitTransaction()
Exceptions
CompleteNext()
public bool CompleteNext()
Returns
ConsumerGroupOffsetsHistory()
public List<Map<String, Map<TopicPartition, OffsetAndMetadata>>> ConsumerGroupOffsetsHistory()
Returns
DisableTelemetry()
public void DisableTelemetry()
ErrorNext(JVMBridgeException)
public bool ErrorNext(JVMBridgeException arg0)
Parameters
arg0
JVMBridgeException
Returns
FenceProducer()
public void FenceProducer()
Flush()
public void Flush()
Flushed()
public bool Flushed()
Returns
History()
public List<ProducerRecord<K, V>> History()
Returns
- List<ProducerRecord<K, V>>
InitTransactions()
public void InitTransactions()
InjectTimeoutException(int)
public void InjectTimeoutException(int arg0)
Parameters
Metrics()
public Map<MetricName, Metric> Metrics()
Returns
PartitionsFor(String)
public List<PartitionInfo> PartitionsFor(String arg0)
Parameters
Returns
Send(ProducerRecord<K, V>)
public Future<RecordMetadata> Send(ProducerRecord<K, V> arg0)
Parameters
arg0
ProducerRecord<K, V>
Returns
Send(ProducerRecord<K, V>, Callback)
public Future<RecordMetadata> Send(ProducerRecord<K, V> arg0, Callback arg1)
Parameters
arg0
ProducerRecord<K, V>arg1
Callback
Returns
SendOffsetsToTransaction(Map<TopicPartition, OffsetAndMetadata>, ConsumerGroupMetadata)
public void SendOffsetsToTransaction(Map<TopicPartition, OffsetAndMetadata> arg0, ConsumerGroupMetadata arg1)
Parameters
Exceptions
SentOffsets()
public bool SentOffsets()
Returns
SetClientInstanceId(Uuid)
public void SetClientInstanceId(Uuid arg0)
Parameters
SetMockMetrics(MetricName, Metric)
public void SetMockMetrics(MetricName arg0, Metric arg1)
Parameters
arg0
MetricNamearg1
Metric
TransactionAborted()
public bool TransactionAborted()
Returns
TransactionCommitted()
public bool TransactionCommitted()
Returns
TransactionInFlight()
public bool TransactionInFlight()
Returns
TransactionInitialized()
public bool TransactionInitialized()
Returns
UncommittedOffsets()
public Map<String, Map<TopicPartition, OffsetAndMetadata>> UncommittedOffsets()
Returns
UncommittedRecords()
public List<ProducerRecord<K, V>> UncommittedRecords()
Returns
- List<ProducerRecord<K, V>>
Operators
implicit operator MockProducer(MockProducer<K, V>)
Converter from MockProducer<K, V> to MockProducer
public static implicit operator MockProducer(MockProducer<K, V> t)
Parameters
t
MockProducer<K, V>