V - value type
VR - transformed value type
public interface ValueTransformer<V,VR>
ValueTransformer interface for stateful mapping of a value to a new value (with possible new type).
This is a stateful record-by-record operation, i.e,
transform(Object) is invoked individually for each
record of a stream and can access and modify a state that is available beyond a single call of
ValueMapper for stateless value transformation).
a method to be
called periodically with the provided context.
ValueTransformer is applied to a
KeyValue pair record the record's key is preserved.
ValueTransformerSupplier to provide new instances of
ValueTransformer to Kafka Stream's runtime.
If a record's key and value should be modified
Transformer can be used.
void init(ProcessorContext context)
close() will be called on it; the
framework may later re-use the transformer by calling
context - the context
java.lang.IllegalStateException - If store gets registered after initialization is already finished
StreamsException - if the store's change log does not contain the partition
StateStore that is
attached to this operator can be accessed and modified arbitrarily (cf.
value - the value to be transformed
init(ProcessorContext) on it again.