Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: corrected interfaces as per discussion

...

Public Interfaces

Code Block
    /**
     * Joins the
     * Join records of this [[KTable]] towith another table keyed on a different key. Updates[[KTable]]'s records using non-windowed inner join. Records from this
  table will join
 * 1 table are joined according to 1 the result of keyExtractor on the other tableKTable.
 Updates to the other table*
 will induce a join on* each@param recordother inthe this table that has
 * that specific foreign key.
 *
 * @param other - the table containing the records to be joined on. Keyed by KO.
     * @param foreignKeyExtractor - extracts the key (KO) from this table's value (V).
     * @param joiner - specifies how to join the records from both tables
     * @param materialized the materialized - the materialized output store (optional)
 output store
     * @param named
     * @param <VR> the value type of the result {@code KTable}
     * @param <KO> the key type of the other {@code KTable}
     * @param <VO> the value type of the other {@code KTable}
     * @return
     */
    <VR, KO, VO> KTable<K, VR> join(final KTable<KO, VO> other,
                                    final Function<V, KO> foreignKeyExtractor,
                                    final ValueJoiner<V, VO, VR> joiner,
                                    final Named named,
                                    final Materialized<K, VR, KeyValueStore<Bytes, byte[]>> materialized);

    /**
     *
     * Join records of this [[KTable]] with another [[KTable]]'s records using non-windowed inner join. Records from this
     * table are joined according to the result of keyExtractor on the other KTable.
     *
     * @param other the table containing the records to be joined on. Keyed by KO
     * @param foreignKeyExtractor extracts the key (KO) from this table's value (V)
     * @param joiner specifies how to join the records from both tables
     * @param materialized the materialized output store
     * @param <VR> the value type of the result {@code KTable}
     * @param <KO> the key type of the other {@code KTable}
     * @param <VO> the value type of the other {@code KTable}
     * @return
     */
    <VR, KO, VO> KTable<K, VR> join(final KTable<KO, VO> other,
                                    final Function<V, KO> foreignKeyExtractor,
                                    final ValueJoiner<V, VO, VR> joiner,
                                    final Materialized<K, VR, KeyValueStore<Bytes, byte[]>> materialized);

    /**
     *
     * Join records of this [[KTable]] with another [[KTable]]'s records using non-windowed left join. Records from this
     * table are joined according to the result of keyExtractor on the other KTable.
     *
     * @param other  the other {@code KTable} to be joined with this {@code KTable}. Keyed by KO
     * @param foreignKeyExtractor extracts the key (KO) from this table's value (V)
     * @param joiner a {@link ValueJoiner} that computes the join result for a pair of matching records
     * @param named     a {@link Named} config used to name the processor in the topology
     * @param materialized  a {@link Materialized} that describes how the {@link StateStore} for the resulting {@code KTable}
     *                      should be materialized. Cannot be {@code null}

     * @param <VR> the value type of the result {@code KTable}
     * @param <KO> the key type of the other {@code KTable}
     * @param <VO> the value type of the other {@code KTable}
     * @return a {@code KTable} that contains only those records that satisfy the given predicate
     */
    <VR, KO, VO> KTable<K, VR> leftJoin(final KTable<KO, VO> other,
                                        final Function<V, KO> foreignKeyExtractor,
                                        final ValueJoiner<V, VO, VR> joiner,
                                        final Named named,
                                        final Materialized<K, VR, KeyValueStore<Bytes, byte[]>> materialized);

    /**
     *
     * Join records of this [[KTable]] with another [[KTable]]'s records using non-windowed left join. Records from this
     * table are joined according to the result of keyExtractor on the other KTable.
     *
     * @param other  the other {@code KTable} to be joined with this {@code KTable}. Keyed by KO
     * @param foreignKeyExtractor extracts the key (KO) from this table's value (V)
     * @param joiner a {@link ValueJoiner} that computes the join result for a pair of matching records
     * @param named     a {@link Named} config used to name the processor in the topology
     * @param materialized  a {@link Materialized} that describes how the {@link StateStore} for the resulting {@code KTable}
     *                      should be materialized. Cannot be {@code null}

     * @param <VR> the value type of the result {@code KTable}
     * @param <KO> the key type of the other {@code KTable}
     * @param <VO> the value type of the other {@code KTable}
     * @return a {@code KTable} that contains only those records that satisfy the given predicate
     */
    <VR, KO, VO> KTable<K, VR> joinleftJoin(final KTable<KO, VO> other,
                                        final ValueMapper<VFunction<V, KO> foreignKeyExtractor,
                                        final ValueJoiner<V, VO, VR> joiner,
                                        final Materialized<K, VR, KeyValueStore<Bytes, byte[]>> materialized);

Workflow

The overall process is outlined below.

...