Skip to main content

TabletLocator

Trait TabletLocator 

Source
pub trait TabletLocator: Send + Sync {
    // Required methods
    fn tablets_for_table(&self, table: &str) -> DistributedResult<Vec<TabletId>>;
    fn partitioning(&self, table: &str) -> DistributedResult<PartitionSpec>;
}
Expand description

Resolves which tablets serve one table. Defined here (not in mongreldb-cluster) so the query crate stays free of the cluster dependency; the cluster wave binds TabletLayout/routing metadata onto this trait.

Required Methods§

Source

fn tablets_for_table(&self, table: &str) -> DistributedResult<Vec<TabletId>>

The tablets serving table, in deterministic layout order.

Source

fn partitioning(&self, table: &str) -> DistributedResult<PartitionSpec>

How table is partitioned across those tablets.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§