Package com.linkedin.venice.utils
Class PubSubHelper.MutablePubSubMessage
- java.lang.Object
-
- com.linkedin.venice.utils.PubSubHelper.MutablePubSubMessage
-
- All Implemented Interfaces:
PubSubMessage
- Enclosing class:
- PubSubHelper
public static class PubSubHelper.MutablePubSubMessage extends java.lang.Object implements PubSubMessage
-
-
Constructor Summary
Constructors Constructor Description MutablePubSubMessage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KafkaKeygetKey()java.lang.LonggetOffset()intgetPayloadSize()longgetPubSubMessageTime()longgetTimestampAfterProduce()longgetTimestampBeforeProduce()PubSubTopicPartitiongetTopicPartition()KafkaMessageEnvelopegetValue()booleanisEndOfBootstrap()PubSubHelper.MutablePubSubMessagesetKey(KafkaKey key)PubSubHelper.MutablePubSubMessagesetOffset(long offset)PubSubHelper.MutablePubSubMessagesetTimestampAfterProduce(long timestampAfterProduce)PubSubHelper.MutablePubSubMessagesetTimestampBeforeProduce(long timestampBeforeProduce)PubSubHelper.MutablePubSubMessagesetTopicPartition(PubSubTopicPartition topicPartition)PubSubHelper.MutablePubSubMessagesetValue(KafkaMessageEnvelope value)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.linkedin.venice.pubsub.api.PubSubMessage
getPartition, getPubSubMessageHeaders, getTopic, getTopicName
-
-
-
-
Method Detail
-
getKey
public KafkaKey getKey()
- Specified by:
getKeyin interfacePubSubMessage- Returns:
- the key part of this message
-
getValue
public KafkaMessageEnvelope getValue()
- Specified by:
getValuein interfacePubSubMessage- Returns:
- the value part of this message
-
getTopicPartition
public PubSubTopicPartition getTopicPartition()
- Specified by:
getTopicPartitionin interfacePubSubMessage- Returns:
- the topic-partition this message belongs to
-
getOffset
public java.lang.Long getOffset()
- Specified by:
getOffsetin interfacePubSubMessage- Returns:
- the offset of this message in the underlying topic-partition
-
getPubSubMessageTime
public long getPubSubMessageTime()
- Specified by:
getPubSubMessageTimein interfacePubSubMessage- Returns:
- the timestamp at which the message was persisted in the pub sub system
-
getPayloadSize
public int getPayloadSize()
- Specified by:
getPayloadSizein interfacePubSubMessage- Returns:
- the size in bytes of the key + value.
-
isEndOfBootstrap
public boolean isEndOfBootstrap()
- Specified by:
isEndOfBootstrapin interfacePubSubMessage- Returns:
- whether this message marks the end of bootstrap.
-
setKey
public PubSubHelper.MutablePubSubMessage setKey(KafkaKey key)
-
setValue
public PubSubHelper.MutablePubSubMessage setValue(KafkaMessageEnvelope value)
-
setTopicPartition
public PubSubHelper.MutablePubSubMessage setTopicPartition(PubSubTopicPartition topicPartition)
-
setOffset
public PubSubHelper.MutablePubSubMessage setOffset(long offset)
-
setTimestampBeforeProduce
public PubSubHelper.MutablePubSubMessage setTimestampBeforeProduce(long timestampBeforeProduce)
-
setTimestampAfterProduce
public PubSubHelper.MutablePubSubMessage setTimestampAfterProduce(long timestampAfterProduce)
-
getTimestampBeforeProduce
public long getTimestampBeforeProduce()
-
getTimestampAfterProduce
public long getTimestampAfterProduce()
-
-