Package com.linkedin.venice.pubsub.api
Class PubSubMessageHeaders
java.lang.Object
com.linkedin.venice.pubsub.api.PubSubMessageHeaders
- All Implemented Interfaces:
Measurable
,Iterable<PubSubMessageHeader>
- Direct Known Subclasses:
EmptyPubSubMessageHeaders
public class PubSubMessageHeaders
extends Object
implements Measurable, Iterable<PubSubMessageHeader>
Set of key-value pairs to tagged with messages produced to a topic.
In case of headers with the same key, only the most recently added headers value will be kept.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(PubSubMessageHeader header) int
boolean
isEmpty()
iterator()
toList()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
VENICE_TRANSPORT_PROTOCOL_HEADER
- See Also:
-
VENICE_LEADER_COMPLETION_STATE_HEADER
Header to denote whether the leader is completed or not- See Also:
-
-
Constructor Details
-
PubSubMessageHeaders
public PubSubMessageHeaders()
-
-
Method Details
-
add
-
add
-
remove
-
toList
- Returns:
- the headers as a List
. Mutating this list will not affect the PubSubMessageHeaders. If no headers are present an empty list is returned.
-
isEmpty
public boolean isEmpty() -
getHeapSize
public int getHeapSize()- Specified by:
getHeapSize
in interfaceMeasurable
-
iterator
- Specified by:
iterator
in interfaceIterable<PubSubMessageHeader>
-