Class ConnectHeaders
java.lang.Object
org.apache.kafka.connect.header.ConnectHeaders
- 
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.kafka.connect.header.Headers
Headers.HeaderTransform - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionAdd to this collection aHeaderwith the given key and value.add(String key, SchemaAndValue schemaAndValue) Add to this collection aHeaderwith the given key and value.Add the givenHeaderto this collection.addBoolean(String key, boolean value) Add to this collection aHeaderwith the given key and value.Add to this collection aHeaderwith the given key and value.Add to this collection aHeaderwith the given key and value.addDecimal(String key, BigDecimal value) Add to this collection aHeaderwith the given key and value.Add to this collection aHeaderwith the given key and value.Add to this collection aHeaderwith the given key and value.Add to this collection aHeaderwith the given key and value.Add to this collection aHeaderwith the given key and value.Add to this collection aHeaderwith the given key and value.Add to this collection aHeaderwith the given key and value.Add to this collection aHeaderwith the given key and value.Add to this collection aHeaderwith the given key and value.addTimestamp(String key, Date value) allWithName(String key) apply(String key, Headers.HeaderTransform transform) Get allHeaders with the given key, apply the transform to each and store the result in place of the original.apply(Headers.HeaderTransform transform) Get allHeaders, apply the transform to each and store the result in place of the original.clear()Removes all headers from this object.Create a copy of thisHeadersobject.booleaninthashCode()booleanisEmpty()Determine whether this object has no headers.iterator()lastWithName(String key) Return the lastHeaderwith the specified key.Removes all but the lastHeaderobject with each key.retainLatest(String key) intsize()Get the number of headers in this object.toString()Methods inherited from interface java.lang.Iterable
forEach, spliterator 
- 
Constructor Details
- 
ConnectHeaders
public ConnectHeaders() - 
ConnectHeaders
 
 - 
 - 
Method Details
- 
size
 - 
isEmpty
 - 
clear
 - 
add
 - 
add
Description copied from interface:HeadersAdd to this collection aHeaderwith the given key and value.- Specified by:
 addin interfaceHeaders- Parameters:
 key- the header's key; may not be nullschemaAndValue- theSchemaAndValuefor the header; may be null- Returns:
 - this object to facilitate chaining multiple methods; never null
 
 - 
add
 - 
addString
 - 
addBytes
 - 
addBoolean
Description copied from interface:HeadersAdd to this collection aHeaderwith the given key and value.- Specified by:
 addBooleanin interfaceHeaders- Parameters:
 key- the header's key; may not be nullvalue- the header's value; may be null- Returns:
 - this object to facilitate chaining multiple methods; never null
 
 - 
addByte
 - 
addShort
 - 
addInt
 - 
addLong
 - 
addFloat
 - 
addDouble
 - 
addList
 - 
addMap
 - 
addStruct
 - 
addDecimal
Description copied from interface:Headers- Specified by:
 addDecimalin interfaceHeaders- Parameters:
 key- the header's key; may not be nullvalue- the header'sDecimalvalue; may be null- Returns:
 - this object to facilitate chaining multiple methods; never null
 
 - 
addDate
Description copied from interface:Headers - 
addTime
Description copied from interface:Headers - 
addTimestamp
Description copied from interface:Headers- Specified by:
 addTimestampin interfaceHeaders- Parameters:
 key- the header's key; may not be nullvalue- the header'sTimestampvalue; may be null- Returns:
 - this object to facilitate chaining multiple methods; never null
 
 - 
lastWithName
Description copied from interface:HeadersReturn the lastHeaderwith the specified key.- Specified by:
 lastWithNamein interfaceHeaders- Parameters:
 key- the key for the header; may not be null- Returns:
 - the last Header, or null if there are no headers with the specified key
 
 - 
allWithName
Description copied from interface:Headers- Specified by:
 allWithNamein interfaceHeaders- Parameters:
 key- the key; may not be null- Returns:
 - the iterator over headers with the specified key; may be null if there are no headers with the specified key
 
 - 
iterator
 - 
remove
 - 
retainLatest
Description copied from interface:HeadersRemoves all but the lastHeaderobject with each key.- Specified by:
 retainLatestin interfaceHeaders- Returns:
 - this object to facilitate chaining multiple methods; never null
 
 - 
retainLatest
Description copied from interface:Headers- Specified by:
 retainLatestin interfaceHeaders- Parameters:
 key- the key; may not be null- Returns:
 - this object to facilitate chaining multiple methods; never null
 
 - 
apply
 - 
apply
 - 
hashCode
 - 
equals
 - 
toString
 - 
duplicate
 
 -