class

Rayo::PG::Coalescer(T)

Inherits Reference < Object

Bounded worker-local collection. Groups stay owned until their final query completes, so multi-stage enrichment never borrows another round's storage.

Constructors

new(batch_size : Int32 = 128, groups = 32, depth : Int32 = 2, parameters : Int32 = 1, window_us : Int32 = 1000, max_window_us : Int32 = 5000, &dispatch : Group(T) -> Nil)
Source

Instance methods

attach
Source
available?(key : Int32 = 0) : Bool
Source
batch_size
Source
close
Source
completed
Source
enqueue(state : T, *args, key : Int32 = 0) : Nil
Source
enqueue(ctx : Context, *args, key : Int32 = 0, &callback : Result, Context -> Nil) : Nil

Use Coalescer(ReadRequest) for the |result, ctx| HTTP overload.

Source
enqueue(state : T, *args, key : Int32 = 0, &callback : Result, T -> Nil) : Nil
Source
flush(now : Int64 = Sys.now_ns(Sys::CLOCK_MONOTONIC)) : Int64 | Nil

Returns the next wake deadline (monotonic ns), or nil. No wait is added to idle traffic. Busy pipelines collect longer, capped to bound tail latency.

Source
in_flight
Source
parameters
Source
queued
Source

Nested types