类 RawMessageImpl

java.lang.Object
org.apache.pulsar.common.api.raw.RawMessageImpl
所有已实现的接口:
RawMessage

public class RawMessageImpl extends Object implements RawMessage
  • 方法详细资料

    • release

      public void release()
      从接口复制的说明: RawMessage
      Release all the resources associated with this raw message.
      指定者:
      release 在接口中 RawMessage
    • get

      public static RawMessage get(ReferenceCountedMessageMetadata msgMetadata, SingleMessageMetadata singleMessageMetadata, io.netty.buffer.ByteBuf payload, long ledgerId, long entryId, long batchIndex)
    • updatePayloadForChunkedMessage

      public RawMessage updatePayloadForChunkedMessage(io.netty.buffer.ByteBuf chunkedTotalPayload)
    • getProperties

      public Map<String,String> getProperties()
      从接口复制的说明: RawMessage
      Return the properties attached to the message.

      Properties are application defined key/value pairs that will be attached to the message.

      指定者:
      getProperties 在接口中 RawMessage
      返回:
      an unmodifiable view of the properties map
    • getData

      public io.netty.buffer.ByteBuf getData()
      从接口复制的说明: RawMessage
      Get the content of the message.
      指定者:
      getData 在接口中 RawMessage
      返回:
      the byte array with the message payload
    • getMessageId

      public RawMessageId getMessageId()
      从接口复制的说明: RawMessage
      Get the unique message ID associated with this message.

      The message id can be used to univocally refer to a message without having the keep the entire payload in memory.

      Only messages received from the consumer will have a message id assigned.

      指定者:
      getMessageId 在接口中 RawMessage
      返回:
      the message id null if this message was not received by this client instance
    • getPublishTime

      public long getPublishTime()
      从接口复制的说明: RawMessage
      Get the publish time of this message. The publish time is the timestamp that a client publish the message.
      指定者:
      getPublishTime 在接口中 RawMessage
      返回:
      publish time of this message.
      另请参阅:
    • getEventTime

      public long getEventTime()
      从接口复制的说明: RawMessage
      Get the event time associated with this message. It is typically set by the applications via MessageBuilder#setEventTime(long).

      If there isn't any event time associated with this event, it will return 0.

      指定者:
      getEventTime 在接口中 RawMessage
    • getSequenceId

      public long getSequenceId()
      从接口复制的说明: RawMessage
      Get the sequence id associated with this message. It is typically set by the applications via MessageBuilder#setSequenceId(long).
      指定者:
      getSequenceId 在接口中 RawMessage
      返回:
      sequence id associated with this message.
      另请参阅:
      • MessageBuilder#setEventTime(long)
    • getProducerName

      public String getProducerName()
      从接口复制的说明: RawMessage
      Get the producer name who produced this message.
      指定者:
      getProducerName 在接口中 RawMessage
      返回:
      producer name who produced this message, null if producer name is not set.
    • getKey

      public Optional<String> getKey()
      从接口复制的说明: RawMessage
      Get the key of the message.
      指定者:
      getKey 在接口中 RawMessage
      返回:
      the key of the message
    • getSchemaVersion

      public byte[] getSchemaVersion()
      从接口复制的说明: RawMessage
      Get the schema version of the message.
      指定者:
      getSchemaVersion 在接口中 RawMessage
      返回:
      the schema version of the message
    • getKeyBytes

      public Optional<io.netty.buffer.ByteBuf> getKeyBytes()
      从接口复制的说明: RawMessage
      Get byteBuf of the key.
      指定者:
      getKeyBytes 在接口中 RawMessage
      返回:
      the byte array with the key payload
    • hasBase64EncodedKey

      public boolean hasBase64EncodedKey()
      从接口复制的说明: RawMessage
      Check whether the key has been base64 encoded.
      指定者:
      hasBase64EncodedKey 在接口中 RawMessage
      返回:
      true if the key is base64 encoded, false otherwise
    • getUUID

      public String getUUID()
      从接口复制的说明: RawMessage
      Get uuid of chunked message.
      指定者:
      getUUID 在接口中 RawMessage
      返回:
      uuid
    • getChunkId

      public int getChunkId()
      从接口复制的说明: RawMessage
      Get chunkId of chunked message.
      指定者:
      getChunkId 在接口中 RawMessage
      返回:
      chunkId
    • getNumChunksFromMsg

      public int getNumChunksFromMsg()
      从接口复制的说明: RawMessage
      Get chunk num of chunked message.
      指定者:
      getNumChunksFromMsg 在接口中 RawMessage
      返回:
      chunk num
    • getTotalChunkMsgSize

      public int getTotalChunkMsgSize()
      从接口复制的说明: RawMessage
      Get chunk message total size in bytes.
      指定者:
      getTotalChunkMsgSize 在接口中 RawMessage
      返回:
      chunked message total size in bytes
    • getBatchSize

      public int getBatchSize()