Class Filters.Builder

java.lang.Object
io.debezium.connector.mysql.legacy.Filters.Builder
Enclosing class:
Filters

public static class Filters.Builder extends Object
  • Field Details

  • Constructor Details

    • 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 Details

    • 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
    • build

      public Filters build()
      Build the filters.
      Returns:
      the Filters