pub struct Factory { /* private fields */ }Expand description
Trading-side AppFactory producing ServerApp instances.
Implementations§
Trait Implementations§
Source§impl AppFactory for Factory
impl AppFactory for Factory
Source§fn empty(&self) -> ServerApp
fn empty(&self) -> ServerApp
Construct an empty application. Used by all paths that need
a clean state: primary startup, replication snapshot receive,
journal replay from genesis.
Source§fn prefault(&self, app: &mut ServerApp)
fn prefault(&self, app: &mut ServerApp)
Pre-allocate internal collections for a known bulk-seed
workload. Called once on the primary startup path before
seeding begins, so the seed phase doesn’t hit allocation
stalls as collections grow.
Source§fn apply_operator_policy(&self, app: &mut ServerApp)
fn apply_operator_policy(&self, app: &mut ServerApp)
Reapply operator-controlled policy (rate limits, caps, …)
to an existing app. The policy is NOT journaled — primary
and replica must apply matching values independently — so
this is called after every snapshot restore (which
reconstructs state but not policy) and after every replica
reconnect that reuses an existing pipeline. Default impl is
a no-op for applications that have no operator policy.
Source§fn seed_events(&self) -> Vec<TradingEvent>
fn seed_events(&self) -> Vec<TradingEvent>
Yield the bulk-seed events the runtime should journal at
startup. Called once on a fresh primary (empty journal, no
snapshot); replicas receive the same events through standard
journal replay and never call this themselves. Default impl
returns an empty
Vec for applications that don’t
bulk-seed. Read moreimpl Copy for Factory
Auto Trait Implementations§
impl Freeze for Factory
impl RefUnwindSafe for Factory
impl Send for Factory
impl Sync for Factory
impl Unpin for Factory
impl UnsafeUnpin for Factory
impl UnwindSafe for Factory
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more