java.lang.Object
org.apache.kafka.streams.processor.To

public class To extends Object
This class is used to provide the optional parameters when sending output records to downstream processor using ProcessorContext.forward(Object, Object, To).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
     
    protected long
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    To(To to)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static To
    all()
    Forward the key/value pair to all downstream processors
    static To
    child(String childName)
    Forward the key/value pair to one of the downstream processors designated by the downstream processor name.
    boolean
     
    int
    Equality is implemented in support of tests, *not* for use in Hash collections, since this class is mutable.
     
    protected void
    update(To to)
     
    withTimestamp(long timestamp)
    Set the timestamp of the output record.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • childName

      protected String childName
    • timestamp

      protected long timestamp
  • Constructor Details

    • To

      protected To(To to)
  • Method Details

    • update

      protected void update(To to)
    • child

      public static To child(String childName)
      Forward the key/value pair to one of the downstream processors designated by the downstream processor name.
      Parameters:
      childName - name of downstream processor
      Returns:
      a new To instance configured with childName
    • all

      public static To all()
      Forward the key/value pair to all downstream processors
      Returns:
      a new To instance configured for all downstream processor
    • withTimestamp

      public To withTimestamp(long timestamp)
      Set the timestamp of the output record.
      Parameters:
      timestamp - the output record timestamp
      Returns:
      itself (i.e., this)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Equality is implemented in support of tests, *not* for use in Hash collections, since this class is mutable.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object