Package io.debezium.connector.mongodb
Class FieldSelector
- java.lang.Object
-
- io.debezium.connector.mongodb.FieldSelector
-
@ThreadSafe public final class FieldSelector extends Object
This filter selector is designed to determine the filter to exclude or rename fields in a document.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceFieldSelector.FieldFilterThis filter is designed to exclude or rename fields in a document.private static classFieldSelector.FieldNameAndValuestatic classFieldSelector.FieldSelectorBuilderA builder of a field selector.private static classFieldSelector.PathRepresents a field that should be excluded from or renamed in MongoDB documents.private static classFieldSelector.RemovePathprivate static classFieldSelector.RenamePath
-
Constructor Summary
Constructors Modifier Constructor Description privateFieldSelector(List<FieldSelector.Path> paths)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FieldSelector.FieldSelectorBuilderbuilder()Returns a newbuilderfor a field selector.FieldSelector.FieldFilterfieldFilterFor(CollectionId id)Returns the field filter for the given collection identifier.
-
-
-
Field Detail
-
DOT
private static final Pattern DOT
-
COLON
private static final Pattern COLON
-
paths
private final List<FieldSelector.Path> paths
The configured exclusion/renaming patterns.
-
-
Constructor Detail
-
FieldSelector
private FieldSelector(List<FieldSelector.Path> paths)
-
-
Method Detail
-
builder
public static FieldSelector.FieldSelectorBuilder builder()
Returns a newbuilderfor a field selector.- Returns:
- the builder; never
null
-
fieldFilterFor
public FieldSelector.FieldFilter fieldFilterFor(CollectionId id)
Returns the field filter for the given collection identifier.Note that the field filter is completely independent of the collection selection predicate, so it is expected that this filter be used only after the collection selection predicate determined the collection containing documents with the field(s) is to be used.
- Parameters:
id- the collection identifier, nevernull- Returns:
- the field filter, never
null
-
-