Package com.linkedin.venice.pubsub.api
Class EmptyPubSubMessageHeaders
- java.lang.Object
-
- com.linkedin.venice.pubsub.api.PubSubMessageHeaders
-
- com.linkedin.venice.pubsub.api.EmptyPubSubMessageHeaders
-
- All Implemented Interfaces:
Measurable
,java.lang.Iterable<PubSubMessageHeader>
public class EmptyPubSubMessageHeaders extends PubSubMessageHeaders
-
-
Field Summary
Fields Modifier and Type Field Description static PubSubMessageHeaders
SINGLETON
-
Fields inherited from class com.linkedin.venice.pubsub.api.PubSubMessageHeaders
VENICE_LEADER_COMPLETION_STATE_HEADER, VENICE_TRANSPORT_PROTOCOL_HEADER
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PubSubMessageHeaders
add(PubSubMessageHeader header)
PubSubMessageHeaders
add(java.lang.String key, byte[] value)
int
getHeapSize()
boolean
isEmpty()
PubSubMessageHeaders
remove(java.lang.String key)
java.util.List<PubSubMessageHeader>
toList()
-
Methods inherited from class com.linkedin.venice.pubsub.api.PubSubMessageHeaders
iterator
-
-
-
-
Field Detail
-
SINGLETON
public static final PubSubMessageHeaders SINGLETON
-
-
Method Detail
-
add
public PubSubMessageHeaders add(PubSubMessageHeader header)
- Overrides:
add
in classPubSubMessageHeaders
-
add
public PubSubMessageHeaders add(java.lang.String key, byte[] value)
- Overrides:
add
in classPubSubMessageHeaders
-
remove
public PubSubMessageHeaders remove(java.lang.String key)
- Overrides:
remove
in classPubSubMessageHeaders
-
toList
public java.util.List<PubSubMessageHeader> toList()
- Overrides:
toList
in classPubSubMessageHeaders
- 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()
- Overrides:
isEmpty
in classPubSubMessageHeaders
-
getHeapSize
public int getHeapSize()
- Specified by:
getHeapSize
in interfaceMeasurable
- Overrides:
getHeapSize
in classPubSubMessageHeaders
-
-