Class Message.Builder

  • Enclosing class:
    Message

    public static class Message.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • stream

        public Message.Builder stream​(String stream)
        The name of the stream that the message belongs to.
        Parameters:
        stream - the value to set
        Returns:
        this builder
      • partition

        public Message.Builder partition​(String partition)
        The ID of the partition where the message is stored.
        Parameters:
        partition - the value to set
        Returns:
        this builder
      • key

        public Message.Builder key​(byte[] key)
        The key associated with the message, expressed as a byte array.
        Parameters:
        key - the value to set
        Returns:
        this builder
      • value

        public Message.Builder value​(byte[] value)
        The value associated with the message, expressed as a byte array.
        Parameters:
        value - the value to set
        Returns:
        this builder
      • offset

        public Message.Builder offset​(Long offset)
        The offset of the message, which uniquely identifies it within the partition.
        Parameters:
        offset - the value to set
        Returns:
        this builder
      • timestamp

        public Message.Builder timestamp​(Date timestamp)
        The timestamp indicating when the server appended the message to the stream.
        Parameters:
        timestamp - the value to set
        Returns:
        this builder