Class PubSubMessageHeader

java.lang.Object
com.linkedin.venice.pubsub.api.PubSubMessageHeader
All Implemented Interfaces:
Measurable

public class PubSubMessageHeader extends Object implements Measurable
A key-value pair that is associated with a message
  • Constructor Details

    • PubSubMessageHeader

      public PubSubMessageHeader(String key, byte[] value)
  • Method Details

    • key

      public String key()
    • value

      public byte[] value()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object otherObj)
      Overrides:
      equals in class Object
    • getHeapSize

      public int getHeapSize()
      TODO: the following estimation doesn't consider the overhead of the internal structure. Kafka headers may legally have null values (and ApacheKafkaConsumerAdapter passes them through verbatim), so guard the value.length dereference and count a null value as zero bytes.
      Specified by:
      getHeapSize in interface Measurable