R
- The type of record.public interface Predicate<R extends ConnectRecord<R>> extends 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.
Modifier and Type | Method and Description |
---|---|
void |
close() |
ConfigDef |
config()
Configuration specification for this predicate.
|
boolean |
test(R record)
Returns whether the given record satisfies this predicate.
|
configure
ConfigDef config()
boolean test(R record)
record
- the record to evaluate; may not be nullvoid close()
close
in interface AutoCloseable