Class SchemaRegistry

java.lang.Object
io.debezium.connector.spanner.db.metadata.SchemaRegistry

public class SchemaRegistry extends Object
Stores schema of the Spanner change stream and database tables
  • Field Details

    • DATABASE_SCHEMA_NOT_CACHED

      private static final String DATABASE_SCHEMA_NOT_CACHED
      See Also:
    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • schemaDao

      private final SchemaDao schemaDao
    • spannerSchema

      private volatile SpannerSchema spannerSchema
    • changeStream

      private volatile ChangeStreamSchema changeStream
    • streamName

      private final String streamName
    • timestamp

      private volatile com.google.cloud.Timestamp timestamp
    • schemaResetTrigger

      private final Runnable schemaResetTrigger
  • Constructor Details

  • Method Details

    • init

      public void init()
    • getWatchedTable

      public TableSchema getWatchedTable(TableId tableId)
    • checkSchema

      public void checkSchema(TableId tableId, com.google.cloud.Timestamp timestamp, List<Column> rowType)
    • validate

      private boolean validate(TableId tableId, List<Column> rowType)
    • updateSchema

      public boolean updateSchema(TableId tableId, com.google.cloud.Timestamp updatedTimestamp, List<Column> rowType)
    • updateSchemaFromStaleTimestamp

      public void updateSchemaFromStaleTimestamp(TableId tableId, com.google.cloud.Timestamp timestamp, List<Column> rowType)
    • forceUpdateSchema

      @VisibleForTesting void forceUpdateSchema(@Nullable TableId tableId, com.google.cloud.Timestamp updatedTimestamp, @Nullable List<Column> rowTypes)
    • getAllTables

      public Set<TableId> getAllTables()