类 RawMessageImpl
java.lang.Object
org.apache.pulsar.common.api.raw.RawMessageImpl
- 所有已实现的接口:
RawMessage
-
方法概要
修饰符和类型方法说明static RawMessageget(ReferenceCountedMessageMetadata msgMetadata, SingleMessageMetadata singleMessageMetadata, io.netty.buffer.ByteBuf payload, long ledgerId, long entryId, long batchIndex) intintGet chunkId of chunked message.io.netty.buffer.ByteBufgetData()Get the content of the message.longGet the event time associated with this message.getKey()Get the key of the message.Optional<io.netty.buffer.ByteBuf>Get byteBuf of the key.Get the unique message ID associated with this message.intGet chunk num of chunked message.Get the producer name who produced this message.Return the properties attached to the message.longGet the publish time of this message.byte[]Get the schema version of the message.longGet the sequence id associated with this message.intGet chunk message total size in bytes.getUUID()Get uuid of chunked message.booleanCheck whether the key has been base64 encoded.voidrelease()Release all the resources associated with this raw message.updatePayloadForChunkedMessage(io.netty.buffer.ByteBuf chunkedTotalPayload)
-
方法详细资料
-
release
public void release()从接口复制的说明:RawMessageRelease 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
-
getProperties
从接口复制的说明:RawMessageReturn 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()从接口复制的说明:RawMessageGet the content of the message.- 指定者:
getData在接口中RawMessage- 返回:
- the byte array with the message payload
-
getMessageId
从接口复制的说明:RawMessageGet 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()从接口复制的说明:RawMessageGet 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()从接口复制的说明:RawMessageGet the event time associated with this message. It is typically set by the applications viaMessageBuilder#setEventTime(long).If there isn't any event time associated with this event, it will return 0.
- 指定者:
getEventTime在接口中RawMessage
-
getSequenceId
public long getSequenceId()从接口复制的说明:RawMessageGet the sequence id associated with this message. It is typically set by the applications viaMessageBuilder#setSequenceId(long).- 指定者:
getSequenceId在接口中RawMessage- 返回:
- sequence id associated with this message.
- 另请参阅:
-
MessageBuilder#setEventTime(long)
-
getProducerName
从接口复制的说明:RawMessageGet the producer name who produced this message.- 指定者:
getProducerName在接口中RawMessage- 返回:
- producer name who produced this message, null if producer name is not set.
-
getKey
从接口复制的说明:RawMessageGet the key of the message.- 指定者:
getKey在接口中RawMessage- 返回:
- the key of the message
-
getSchemaVersion
public byte[] getSchemaVersion()从接口复制的说明:RawMessageGet the schema version of the message.- 指定者:
getSchemaVersion在接口中RawMessage- 返回:
- the schema version of the message
-
getKeyBytes
从接口复制的说明:RawMessageGet byteBuf of the key.- 指定者:
getKeyBytes在接口中RawMessage- 返回:
- the byte array with the key payload
-
hasBase64EncodedKey
public boolean hasBase64EncodedKey()从接口复制的说明:RawMessageCheck whether the key has been base64 encoded.- 指定者:
hasBase64EncodedKey在接口中RawMessage- 返回:
- true if the key is base64 encoded, false otherwise
-
getUUID
从接口复制的说明:RawMessageGet uuid of chunked message.- 指定者:
getUUID在接口中RawMessage- 返回:
- uuid
-
getChunkId
public int getChunkId()从接口复制的说明:RawMessageGet chunkId of chunked message.- 指定者:
getChunkId在接口中RawMessage- 返回:
- chunkId
-
getNumChunksFromMsg
public int getNumChunksFromMsg()从接口复制的说明:RawMessageGet chunk num of chunked message.- 指定者:
getNumChunksFromMsg在接口中RawMessage- 返回:
- chunk num
-
getTotalChunkMsgSize
public int getTotalChunkMsgSize()从接口复制的说明:RawMessageGet chunk message total size in bytes.- 指定者:
getTotalChunkMsgSize在接口中RawMessage- 返回:
- chunked message total size in bytes
-
getBatchSize
public int getBatchSize()
-