Package org.apache.kafka.streams.kstream
Interface ForeachAction<K,V>
- Type Parameters:
K
- key typeV
- value type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The
ForeachAction
interface for performing an action on a key-value
pair
.
This is a stateless record-by-record operation, i.e, apply(Object, Object)
is invoked individually for each
record of a stream.
If stateful processing is required, consider using
KStream#process(...)
.- See Also:
-
Method Summary
-
Method Details
-
apply
Perform an action for each record of a stream.- Parameters:
key
- the key of the recordvalue
- the value of the record
-