of

fun of(settings: QueryStoreSettings, stores: Map<String, Store>, pressures: (String) -> WritePressure = { WritePressure.NONE }, unpinned: (AggregateType) -> UnpinnedEvents = { UnpinnedEvents.ALLOW }): QueryStores

The bounds of stores' queries as settings say. The bulkhead of a store is wow.stores.<name>.query.max-concurrent, else wow.query.max-concurrent, else its pool's (StoreQueryBounds.maxConcurrent); 0 sets none. A store without StoreQueries has no queries to bound. A query beyond the bound waits at most the store's max-wait, else the global one, in a queue of at most its max-queued, else the global one, else 4 per permit.

A bound neither setting fixes always adapts to the store's write pressure (pressures): it starts at the pool's and moves between the floor and the ceiling (store over global, the ceiling else the pool's StoreQueryBounds.ceiling). A bound below zero, or a ceiling below one, is refused with the configuration key at fault.