Namespace-window batcher for the WARaft replacement backend.
The normal WARaft write path stays direct. This process is used only when a
namespace explicitly configures a window_ms larger than the default, so the
common SET/DEL hot path does not pay a GenServer hop just to discover there is
nothing to coalesce.
Summary
Functions
Returns a specification to start this module under a supervisor.
Types
@type hot_slot() :: %{ groups: [{GenServer.from(), [term()]}], count: non_neg_integer(), timer_ref: reference() | nil, timer_token: reference() | nil, window_ms: non_neg_integer(), created_mono: integer() }
@type slot() :: %{ commands: [tuple()], froms: [GenServer.from()], count: non_neg_integer(), timer_ref: reference() | nil, timer_token: reference() | nil, window_ms: pos_integer(), created_mono: integer() }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec flush(non_neg_integer(), timeout()) :: :ok | {:error, term()}
@spec name(non_neg_integer()) :: atom()
@spec start_link( non_neg_integer(), keyword() ) :: GenServer.on_start()
@spec stop(non_neg_integer()) :: :ok
@spec write(non_neg_integer(), binary(), tuple(), pos_integer()) :: term()
@spec write_batch(non_neg_integer(), [tuple()]) :: term()
@spec write_delete_batch(non_neg_integer(), [binary()]) :: term()
@spec write_delete_batch_async( non_neg_integer(), [binary()], GenServer.from(), Ferricstore.Raft.WARaftBackend.SyncGate.token() | nil ) :: :ok | {:direct, term()}
@spec write_put_batch(non_neg_integer(), [{binary(), binary(), non_neg_integer()}]) :: term()
@spec write_put_batch_async( non_neg_integer(), [{binary(), binary(), non_neg_integer()}], GenServer.from(), Ferricstore.Raft.WARaftBackend.SyncGate.token() | nil ) :: :ok | {:direct, term()}