R - The type of record.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.
Kafka Connect may discover implementations of this interface using the Java ServiceLoader mechanism. To support this, implementations of this interface should also contain a service provider configuration file in META-INF/services/org.apache.kafka.connect.transforms.predicates.Predicate.
| Modifier and Type | Method and 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. |
org.apache.kafka.common.config.ConfigDef config()
boolean test(R record)
record - the record to evaluate; may not be nullvoid close()
close in interface AutoCloseable