Interface Predicate<R extends ConnectRecord<R>>

  • Type Parameters:
    R - The type of record.
    All Superinterfaces:
    AutoCloseable, org.apache.kafka.common.Configurable

    public interface Predicate<R extends ConnectRecord<R>>
    extends org.apache.kafka.common.Configurable, AutoCloseable

    A predicate on records. Predicates can be used to conditionally apply a Transformation by configuring the transformation's predicate (and negate) configuration parameters. In particular, the Filter transformation can be conditionally applied in order to filter certain records from further processing.

    Implementations of this interface must be public and have a public constructor with no parameters.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()  
      org.apache.kafka.common.config.ConfigDef config()
      Configuration specification for this predicate.
      boolean test​(R record)
      Returns whether the given record satisfies this predicate.
      • Methods inherited from interface org.apache.kafka.common.Configurable

        configure
    • Method Detail

      • config

        org.apache.kafka.common.config.ConfigDef config()
        Configuration specification for this predicate.
        Returns:
        the configuration definition for this predicate; never null
      • test

        boolean test​(R record)
        Returns whether the given record satisfies this predicate.
        Parameters:
        record - the record to evaluate; may not be null
        Returns:
        true if the predicate matches, or false otherwise