Class ImmutablePubSubMessage<K,​V>

  • All Implemented Interfaces:
    Measurable, PubSubMessage<K,​V,​java.lang.Long>

    public class ImmutablePubSubMessage<K,​V>
    extends java.lang.Object
    implements PubSubMessage<K,​V,​java.lang.Long>
    • Constructor Detail

      • ImmutablePubSubMessage

        public ImmutablePubSubMessage​(K key,
                                      V value,
                                      PubSubTopicPartition topicPartition,
                                      long offset,
                                      long timestamp,
                                      int payloadSize)
    • Method Detail

      • getKey

        public K getKey()
        Specified by:
        getKey in interface PubSubMessage<K,​V,​java.lang.Long>
        Returns:
        the key part of this message
      • getValue

        public V getValue()
        Specified by:
        getValue in interface PubSubMessage<K,​V,​java.lang.Long>
        Returns:
        the value part of this message
      • getOffset

        public java.lang.Long getOffset()
        Specified by:
        getOffset in interface PubSubMessage<K,​V,​java.lang.Long>
        Returns:
        the offset of this message in the underlying topic-partition
      • getPubSubMessageTime

        public long getPubSubMessageTime()
        Specified by:
        getPubSubMessageTime in interface PubSubMessage<K,​V,​java.lang.Long>
        Returns:
        the timestamp at which the message was persisted in the pub sub system
      • getPayloadSize

        public int getPayloadSize()
        Specified by:
        getPayloadSize in interface PubSubMessage<K,​V,​java.lang.Long>
        Returns:
        the size in bytes of the key + value.
      • isEndOfBootstrap

        public boolean isEndOfBootstrap()
        Specified by:
        isEndOfBootstrap in interface PubSubMessage<K,​V,​java.lang.Long>
        Returns:
        whether this message marks the end of bootstrap.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object