public interface BatchMessageContainerBase extends BatchMessageContainer
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(MessageImpl<?> msg,
SendCallback callback)
Add message to the batch message container.
|
ProducerImpl.OpSendMsg |
createOpSendMsg()
Create OpSendMsg, producer use OpSendMsg to send to the broker.
|
List<ProducerImpl.OpSendMsg> |
createOpSendMsgs()
Create list of OpSendMsg, producer use OpSendMsg to send to the broker.
|
boolean |
hasSameSchema(MessageImpl<?> msg)
Check the batch message container has same schema with the message want to add.
|
boolean |
hasSameTxn(MessageImpl<?> msg)
Check whether the added message belong to the same txn with batch message container.
|
boolean |
haveEnoughSpace(MessageImpl<?> msg)
Check the batch message container have enough space for the message want to add.
|
void |
setProducer(ProducerImpl<?> producer)
Set producer of the message batch container.
|
clear, discard, getCurrentBatchSize, getNumMessagesInBatch, isEmpty, isMultiBatchesboolean add(MessageImpl<?> msg, SendCallback callback)
msg - message will add to the batch message containercallback - message send callbackboolean haveEnoughSpace(MessageImpl<?> msg)
msg - the message want to addboolean hasSameSchema(MessageImpl<?> msg)
msg - the message want to addvoid setProducer(ProducerImpl<?> producer)
producer - producerList<ProducerImpl.OpSendMsg> createOpSendMsgs() throws IOException
IOExceptionProducerImpl.OpSendMsg createOpSendMsg() throws IOException
IOExceptionboolean hasSameTxn(MessageImpl<?> msg)
msg - added messageCopyright © 2017–2020 Apache Software Foundation. All rights reserved.