类 AbstractBatchMessageContainer

  • 所有已实现的接口:
    org.apache.pulsar.client.api.BatchMessageContainer, BatchMessageContainerBase

    public abstract class AbstractBatchMessageContainer
    extends java.lang.Object
    implements BatchMessageContainerBase
    Batch message container framework.
    • 字段详细资料

      • compressionType

        protected org.apache.pulsar.common.api.proto.CompressionType compressionType
      • compressor

        protected org.apache.pulsar.common.compression.CompressionCodec compressor
      • topicName

        protected java.lang.String topicName
      • producerName

        protected java.lang.String producerName
      • maxNumMessagesInBatch

        protected int maxNumMessagesInBatch
      • maxBytesInBatch

        protected int maxBytesInBatch
      • numMessagesInBatch

        protected int numMessagesInBatch
      • currentBatchSizeBytes

        protected long currentBatchSizeBytes
      • currentTxnidMostBits

        protected long currentTxnidMostBits
      • currentTxnidLeastBits

        protected long currentTxnidLeastBits
      • INITIAL_BATCH_BUFFER_SIZE

        protected static final int INITIAL_BATCH_BUFFER_SIZE
        另请参阅:
        常量字段值
      • maxBatchSize

        protected int maxBatchSize
    • 构造器详细资料

      • AbstractBatchMessageContainer

        public AbstractBatchMessageContainer()
    • 方法详细资料

      • haveEnoughSpace

        public boolean haveEnoughSpace​(MessageImpl<?> msg)
        从接口复制的说明: BatchMessageContainerBase
        Check the batch message container have enough space for the message want to add.
        指定者:
        haveEnoughSpace 在接口中 BatchMessageContainerBase
        参数:
        msg - the message want to add
        返回:
        return true if the container have enough space for the specific message, otherwise return false.
      • isBatchFull

        protected boolean isBatchFull()
      • getNumMessagesInBatch

        public int getNumMessagesInBatch()
        指定者:
        getNumMessagesInBatch 在接口中 org.apache.pulsar.client.api.BatchMessageContainer
      • getCurrentBatchSize

        public long getCurrentBatchSize()
        指定者:
        getCurrentBatchSize 在接口中 org.apache.pulsar.client.api.BatchMessageContainer