Class Filters.Builder
- java.lang.Object
-
- io.debezium.connector.mysql.legacy.Filters.Builder
-
-
Field Summary
Fields Modifier and Type Field Description private Tables.ColumnNameFilter
columnFilter
private Configuration
config
private Predicate<String>
dbFilter
private Predicate<String>
isBuiltInDb
private Predicate<TableId>
isBuiltInTable
private Predicate<TableId>
isIgnoredTable
private Predicate<TableId>
tableFilter
-
Constructor Summary
Constructors Constructor Description Builder(Configuration config)
Create a Builder for a filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Filters
build()
Build the filters.Filters.Builder
excludeAllTables(Filters otherFilter)
Exclude all those tables included by the given filter.Filters.Builder
excludeDatabases(Predicate<String> databases)
Exclude all the databases that the given predicate tests as true for.Filters.Builder
excludeTables(Predicate<TableId> tables)
Exclude all the tables that the given predicate tests as true for.Filters.Builder
includeDatabases(Predicate<String> databases)
Include all the databases that the given predicate tests as true for.Filters.Builder
includeTables(Predicate<TableId> tables)
Include the tables that the given predicate tests as true for.Filters.Builder
setFiltersFromFilters(Filters filters)
Set the filter to match the given other filter.Filters.Builder
setFiltersFromOffsets(Map<String,?> offsets)
Completely reset the filter to match the filter info in the given offsets.private void
setFiltersFromStrings(String dbIncludeList, String dbExcludeList, String tableIncludeList, String tableExcludeList)
-
-
-
Field Detail
-
columnFilter
private Tables.ColumnNameFilter columnFilter
-
config
private final Configuration config
-
-
Constructor Detail
-
Builder
public Builder(Configuration config)
Create a Builder for a filter. Set the initial filter data to match the filter data in the given configuration.- Parameters:
config
- the configuration of the connector.
-
-
Method Detail
-
setFiltersFromOffsets
public Filters.Builder setFiltersFromOffsets(Map<String,?> offsets)
Completely reset the filter to match the filter info in the given offsets. This will completely reset the filters to those passed in.- Parameters:
offsets
- The offsets to set the filter info to.- Returns:
- this
-
setFiltersFromStrings
private void setFiltersFromStrings(String dbIncludeList, String dbExcludeList, String tableIncludeList, String tableExcludeList)
-
setFiltersFromFilters
public Filters.Builder setFiltersFromFilters(Filters filters)
Set the filter to match the given other filter. This will completely reset the filters to those passed in.- Parameters:
filters
- The other filter- Returns:
- this
-
excludeAllTables
public Filters.Builder excludeAllTables(Filters otherFilter)
Exclude all those tables included by the given filter.- Parameters:
otherFilter
- the filter- Returns:
- this
-
excludeDatabases
public Filters.Builder excludeDatabases(Predicate<String> databases)
Exclude all the databases that the given predicate tests as true for.- Parameters:
databases
- the databases to excluded- Returns:
-
includeDatabases
public Filters.Builder includeDatabases(Predicate<String> databases)
Include all the databases that the given predicate tests as true for. All databases previously included will still be included.- Parameters:
databases
- the databases to be included- Returns:
-
excludeTables
public Filters.Builder excludeTables(Predicate<TableId> tables)
Exclude all the tables that the given predicate tests as true for.- Parameters:
tables
- the tables to be excluded.- Returns:
- this
-
includeTables
public Filters.Builder includeTables(Predicate<TableId> tables)
Include the tables that the given predicate tests as true for. Tables previously included will still be included.- Parameters:
tables
- the tables to be included.- Returns:
- this
-
-