Package dev.frostlake.stream
Class StreamManager
java.lang.Object
dev.frostlake.stream.StreamManager
Manages streams and tracks changes to tables
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncapturingStreams(String qualifiedTableName) The streams capturingqualifiedTableName, resolved ONCE for a bulk apply — commit used to re-walk every schema's streams per committed ROW.voidonDatabaseDropped(String databaseName) Forget the counters of every table in a dropped database (DROP DATABASE cascades).voidonSchemaDropped(String databaseName, String schemaName) Forget the counters of every table in a dropped schema (DROP SCHEMA cascades to its tables).voidonTableDropped(String qualifiedTableName) Forget a table's change-tracking row-id counter when the table is dropped, sorowIdCountersdoes not grow without bound as tables are created and dropped over the engine's lifetime.voidseedInitialRows(Stream stream, String qualifiedTableName, List<Row> rows) Seed a freshly created SHOW_INITIAL_ROWS stream with the source table's existing rows as INSERT records, so the stream's first read returns the current table contents (Snowflake semantics).voidtrackDelete(String qualifiedTableName, Row row) Track a DELETE operationvoidtrackDelete(List<Stream> capturing, String qualifiedTableName, Row row) trackDelete(String, Row)over a PRE-RESOLVED capture list (bulk commit apply).voidtrackInsert(String qualifiedTableName, Row row) Track an INSERT operationvoidtrackInsert(List<Stream> capturing, String qualifiedTableName, Row row) trackInsert(String, Row)over a PRE-RESOLVED capture list (bulk commit apply).voidtrackUpdate(String qualifiedTableName, Row oldRow, Row newRow) Track an UPDATE operationvoidtrackUpdate(String, Row, Row)over a PRE-RESOLVED capture list (bulk commit apply).
-
Constructor Details
-
StreamManager
-
-
Method Details
-
trackInsert
Track an INSERT operation -
capturingStreams
The streams capturingqualifiedTableName, resolved ONCE for a bulk apply — commit used to re-walk every schema's streams per committed ROW. An empty answer lets the caller skip old-image copies and record construction entirely. -
trackInsert
trackInsert(String, Row)over a PRE-RESOLVED capture list (bulk commit apply). -
trackUpdate
trackUpdate(String, Row, Row)over a PRE-RESOLVED capture list (bulk commit apply). -
trackDelete
trackDelete(String, Row)over a PRE-RESOLVED capture list (bulk commit apply). -
trackUpdate
Track an UPDATE operation -
trackDelete
Track a DELETE operation -
seedInitialRows
Seed a freshly created SHOW_INITIAL_ROWS stream with the source table's existing rows as INSERT records, so the stream's first read returns the current table contents (Snowflake semantics). Subsequent reads after consumption then return only new changes as usual. -
onTableDropped
Forget a table's change-tracking row-id counter when the table is dropped, sorowIdCountersdoes not grow without bound as tables are created and dropped over the engine's lifetime. Keyed by the fully-qualified name, normalized to upper case to match the write path (getNextRowId(java.lang.String)). -
onSchemaDropped
Forget the counters of every table in a dropped schema (DROP SCHEMA cascades to its tables). -
onDatabaseDropped
Forget the counters of every table in a dropped database (DROP DATABASE cascades).
-