Package com.linkedin.venice.utils
Class PubSubHelper.MutablePubSubMessage
- java.lang.Object
-
- com.linkedin.venice.utils.PubSubHelper.MutablePubSubMessage
-
- All Implemented Interfaces:
Measurable
,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 int
getHeapSize()
KafkaKey
getKey()
java.lang.Long
getOffset()
int
getPayloadSize()
long
getPubSubMessageTime()
long
getTimestampAfterProduce()
long
getTimestampBeforeProduce()
PubSubTopicPartition
getTopicPartition()
KafkaMessageEnvelope
getValue()
boolean
isEndOfBootstrap()
PubSubHelper.MutablePubSubMessage
setKey(KafkaKey key)
PubSubHelper.MutablePubSubMessage
setOffset(long offset)
PubSubHelper.MutablePubSubMessage
setTimestampAfterProduce(long timestampAfterProduce)
PubSubHelper.MutablePubSubMessage
setTimestampBeforeProduce(long timestampBeforeProduce)
PubSubHelper.MutablePubSubMessage
setTopicPartition(PubSubTopicPartition topicPartition)
PubSubHelper.MutablePubSubMessage
setValue(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:
getKey
in interfacePubSubMessage
- Returns:
- the key part of this message
-
getValue
public KafkaMessageEnvelope getValue()
- Specified by:
getValue
in interfacePubSubMessage
- Returns:
- the value part of this message
-
getTopicPartition
public PubSubTopicPartition getTopicPartition()
- Specified by:
getTopicPartition
in interfacePubSubMessage
- Returns:
- the topic-partition this message belongs to
-
getOffset
public java.lang.Long getOffset()
- Specified by:
getOffset
in interfacePubSubMessage
- Returns:
- the offset of this message in the underlying topic-partition
-
getPubSubMessageTime
public long getPubSubMessageTime()
- Specified by:
getPubSubMessageTime
in interfacePubSubMessage
- Returns:
- the timestamp at which the message was persisted in the pub sub system
-
getPayloadSize
public int getPayloadSize()
- Specified by:
getPayloadSize
in interfacePubSubMessage
- Returns:
- the size in bytes of the key + value.
-
isEndOfBootstrap
public boolean isEndOfBootstrap()
- Specified by:
isEndOfBootstrap
in 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()
-
getHeapSize
public int getHeapSize()
- Specified by:
getHeapSize
in interfaceMeasurable
-
-