Interface ValueTransformer<V,VR>

Type Parameters:
V - value type
VR - transformed value type

public interface ValueTransformer<V,VR>
The 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 transform(Object) (cf. ValueMapper for stateless value transformation). Additionally, this ValueTransformer can schedule a method to be called periodically with the provided context. If ValueTransformer is applied to a KeyValue pair record the record's key is preserved.

Use 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.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close this transformer and clean up any resources.
    void
    Initialize this transformer.
    transform(V value)
    Transform the given value to a new value.