Trait kitsune_p2p_dht::persistence::AccessOpStore
source · pub trait AccessOpStore<O: OpRegion<D>, D: RegionDataConstraints = RegionData>: Send {
// Required methods
fn query_op_data(&self, region: &RegionCoords) -> Vec<Arc<O>>;
fn query_region_data(&self, region: &RegionCoords) -> D;
fn fetch_region_set(
&self,
coords: RegionCoordSetLtcs
) -> MustBoxFuture<'_, Result<RegionSetLtcs<D>, ()>>;
fn integrate_ops<Ops: Clone + Iterator<Item = Arc<O>>>(&mut self, ops: Ops);
fn gossip_params(&self) -> GossipParams;
fn topo(&self) -> &Topology;
// Provided methods
fn integrate_op(&mut self, op: Arc<O>) { ... }
fn region_set(&self, arq_set: ArqSet, now: TimeQuantum) -> RegionSet<D> { ... }
}
Expand description
All methods involved in accessing the op store, to be implemented by the host.
Required Methods§
sourcefn query_op_data(&self, region: &RegionCoords) -> Vec<Arc<O>>
fn query_op_data(&self, region: &RegionCoords) -> Vec<Arc<O>>
Query the actual ops inside a region
sourcefn query_region_data(&self, region: &RegionCoords) -> D
fn query_region_data(&self, region: &RegionCoords) -> D
Query the RegionData of a region, including the hash of all ops, size, and count
sourcefn fetch_region_set(
&self,
coords: RegionCoordSetLtcs
) -> MustBoxFuture<'_, Result<RegionSetLtcs<D>, ()>>
fn fetch_region_set( &self, coords: RegionCoordSetLtcs ) -> MustBoxFuture<'_, Result<RegionSetLtcs<D>, ()>>
Fetch a set of Regions (the coords and the data) given the set of coords
sourcefn integrate_ops<Ops: Clone + Iterator<Item = Arc<O>>>(&mut self, ops: Ops)
fn integrate_ops<Ops: Clone + Iterator<Item = Arc<O>>>(&mut self, ops: Ops)
Integrate incoming ops, updating the necessary stores
sourcefn gossip_params(&self) -> GossipParams
fn gossip_params(&self) -> GossipParams
Get the GossipParams associated with this store
Provided Methods§
sourcefn integrate_op(&mut self, op: Arc<O>)
fn integrate_op(&mut self, op: Arc<O>)
Integrate a single op
sourcefn region_set(&self, arq_set: ArqSet, now: TimeQuantum) -> RegionSet<D>
fn region_set(&self, arq_set: ArqSet, now: TimeQuantum) -> RegionSet<D>
Get the RegionSet for this node, suitable for gossiping
Object Safety§
This trait is not object safe.