pub struct DrainHandle { /* private fields */ }Expand description
The coordinator-side handle: a cheap clone of the control sender. Lives on the Node main
thread; its methods are called from the napi Db surface as queries are
registered/destroyed, connections come and go, and commits land.
Implementations§
Source§impl DrainHandle
impl DrainHandle
Sourcepub fn register_query(
&self,
query_id: QueryId,
worker: usize,
fold: NormalizeFold,
normalized_fp: u64,
proj: ProjMap,
hydrated_cv: u64,
)
pub fn register_query( &self, query_id: QueryId, worker: usize, fold: NormalizeFold, normalized_fp: u64, proj: ProjMap, hydrated_cv: u64, )
Register a (possibly shared) engine query’s footprint fold + routing/progress state.
Sent right after cluster.query(query_id, ..) returns the hosting worker; a
Hydrated that races ahead of it is buffered and replayed on register.
Sourcepub fn register_family(
&self,
query_id: QueryId,
worker: usize,
param_cols: Vec<ColId>,
hydrated_cv: u64,
)
pub fn register_family( &self, query_id: QueryId, worker: usize, param_cols: Vec<ColId>, hydrated_cv: u64, )
Register a parameterized query family’s routing/progress state and partition key
(design 310 §5.2). Sent right after cluster.family(..) returns the hosting worker;
its partitions follow via bind_partition.
Sourcepub fn bind_partition(
&self,
query_id: QueryId,
binding: Binding,
fold: NormalizeFold,
normalized_fp: u64,
proj: ProjMap,
hydrated_cv: u64,
)
pub fn bind_partition( &self, query_id: QueryId, binding: Binding, fold: NormalizeFold, normalized_fp: u64, proj: ProjMap, hydrated_cv: u64, )
Add one partition (its footprint fold, built from the concrete member AST) to a registered family.
Sourcepub fn unbind_partition(&self, query_id: QueryId, binding: Binding)
pub fn unbind_partition(&self, query_id: QueryId, binding: Binding)
Drop one partition’s drain-side state (after cluster.unbind).
Sourcepub fn attach_subscriber(
&self,
query_id: QueryId,
sub: SubId,
conn: ConnId,
epoch: u64,
)
pub fn attach_subscriber( &self, query_id: QueryId, sub: SubId, conn: ConnId, epoch: u64, )
Attach a subscriber (its own conn route + epoch) to a registered engine query.
Sourcepub fn attach_partition_subscriber(
&self,
query_id: QueryId,
binding: Binding,
sub: SubId,
conn: ConnId,
epoch: u64,
)
pub fn attach_partition_subscriber( &self, query_id: QueryId, binding: Binding, sub: SubId, conn: ConnId, epoch: u64, )
Attach a subscriber to one partition of a registered family.
Sourcepub fn detach_subscriber(&self, sub: SubId)
pub fn detach_subscriber(&self, sub: SubId)
Detach one subscriber, leaving the shared engine query (and its peers) running.
Sourcepub fn fault_subscribers(&self, query_id: QueryId, reason: String)
pub fn fault_subscribers(&self, query_id: QueryId, reason: String)
Fault every subscriber on an engine query (terminal faulted each) and detach them,
leaving the query itself in place for the caller to remove_query
next — e.g. an explicit dematerialize that has active subscribers to notify.
Sourcepub fn remove_query(&self, query_id: QueryId)
pub fn remove_query(&self, query_id: QueryId)
Tear down an engine query’s drain-side state (after cluster.destroy_query).
Sourcepub fn disconnect(&self, conn: ConnId)
pub fn disconnect(&self, conn: ConnId)
Drop a connection and all its queries’ drain-side state.
Trait Implementations§
Source§impl Clone for DrainHandle
impl Clone for DrainHandle
Source§fn clone(&self) -> DrainHandle
fn clone(&self) -> DrainHandle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more