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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getKey()
int
long
long
long
getValue()
boolean
setOffset
(long offset) setTimestampAfterProduce
(long timestampAfterProduce) setTimestampBeforeProduce
(long timestampBeforeProduce) setTopicPartition
(PubSubTopicPartition topicPartition) 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
-
Constructor Details
-
MutablePubSubMessage
public MutablePubSubMessage()
-
-
Method Details
-
getKey
- Specified by:
getKey
in interfacePubSubMessage
- Returns:
- the key part of this message
-
getValue
- Specified by:
getValue
in interfacePubSubMessage
- Returns:
- the value part of this message
-
getTopicPartition
- Specified by:
getTopicPartition
in interfacePubSubMessage
- Returns:
- the topic-partition this message belongs to
-
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
-
setValue
-
setTopicPartition
-
setOffset
-
setTimestampBeforeProduce
-
setTimestampAfterProduce
-
getTimestampBeforeProduce
public long getTimestampBeforeProduce() -
getTimestampAfterProduce
public long getTimestampAfterProduce() -
getHeapSize
public int getHeapSize()- Specified by:
getHeapSize
in interfaceMeasurable
-