PostgresTimerStore
The TimerStore of one bounded context on PostgreSQL: a table per aggregate type, wow_timer__<context>__<aggregate>, in the database of the type's log (PostgresTimerTables), created on the type's first use and recorded in the registry wow_timer_aggregate.
Every write is autocommitted and goes to its owner's table: a put is an upsert whose conflict condition admits only another timer at the same or a later version; a cancel is a conditional update; a settle is one batch of conditional updates per table, each on the row as it was loaded. The due read takes every partition and every table in one statement, a UNION ALL of each table's read over its partial index of the PENDING timers, merged by due time; the same statement counts the registry's tables, so a table another node created since this store last read the registry is read again at once.
JDBC calls run on dispatcher, virtual threads by default (JDK 21).
Constructors
Functions
Creates the registry of timer tables when missing; refuses one recorded in another format. Each aggregate type's table is created on its first use.
One batch of conditional updates per table: one round trip for every change of a type.