Class FixedKeyRecord<K,V> 
java.lang.Object
org.apache.kafka.streams.processor.api.FixedKeyRecord<K,V> 
- Type Parameters:
- K- The type of the fixed key
- V- The type of the value
A data class representing an incoming record with fixed key for processing in a 
FixedKeyProcessor
 or a record to forward to downstream processors via FixedKeyProcessorContext.
 This class encapsulates all the data attributes of a record: the key and value, but
 also the timestamp of the record and any record headers.
 Though key is not allowed to be changes.
 This class is immutable, though the objects referenced in the attributes of this class
 may themselves be mutable.- 
Method SummaryModifier and TypeMethodDescriptionbooleaninthashCode()headers()The headers of the record.key()The key of the record.longThe timestamp of the record.toString()value()The value of the record.withHeaders(Headers headers) A convenient way to produce a new record if you only need to change the headers.withTimestamp(long timestamp) A convenient way to produce a new record if you only need to change the timestamp.<NewV> FixedKeyRecord<K,NewV> withValue(NewV value) A convenient way to produce a new record if you only need to change the value.
- 
Method Details- 
keyThe key of the record. May be null.
- 
valueThe value of the record. May be null.
- 
timestamppublic long timestamp()The timestamp of the record. Will never be negative.
- 
headersThe headers of the record. Never null.
- 
withValueA convenient way to produce a new record if you only need to change the value. Copies the attributes of this record with the value replaced.- Type Parameters:
- NewV- The type of the new record's value.
- Parameters:
- value- The value of the result record.
- Returns:
- A new Record instance with all the same attributes (except that the value is replaced).
 
- 
withTimestampA convenient way to produce a new record if you only need to change the timestamp. Copies the attributes of this record with the timestamp replaced.- Parameters:
- timestamp- The timestamp of the result record.
- Returns:
- A new Record instance with all the same attributes (except that the timestamp is replaced).
 
- 
withHeadersA convenient way to produce a new record if you only need to change the headers. Copies the attributes of this record with the headers replaced. Also makes a copy of the provided headers. SeeFixedKeyProcessorContext.forward(FixedKeyRecord)for considerations around mutability of keys, values, and headers.- Parameters:
- headers- The headers of the result record.
- Returns:
- A new Record instance with all the same attributes (except that the headers are replaced).
 
- 
toString
- 
equals
- 
hashCodepublic int hashCode()
 
-