pub trait ParallelWorkers:
WorkerTransfers
+ ObjectBlockOps
+ Send
+ Sync {
// Required methods
fn export_metadata(&self) -> Result<Vec<SerializedLayoutResponse>>;
fn import_metadata(
&self,
metadata: Vec<SerializedLayout>,
) -> Result<Vec<ImportMetadataResponse>>;
fn worker_count(&self) -> usize;
fn workers(&self) -> &[Arc<dyn Worker>];
}Expand description
A cohort of parallel workers.
This trait is used to drive one or more parallel workers.
Required Methods§
Sourcefn export_metadata(&self) -> Result<Vec<SerializedLayoutResponse>>
fn export_metadata(&self) -> Result<Vec<SerializedLayoutResponse>>
Export the local metadata for a set of workers.
Layouts will be returned in rank order.
§Returns
A kvbm_physical::manager::SerializedLayout containing the local metadata
Sourcefn import_metadata(
&self,
metadata: Vec<SerializedLayout>,
) -> Result<Vec<ImportMetadataResponse>>
fn import_metadata( &self, metadata: Vec<SerializedLayout>, ) -> Result<Vec<ImportMetadataResponse>>
Import the remote metadata for this worker.
Handles will be returned in rank order.
§Arguments
metadata- Akvbm_physical::manager::SerializedLayoutcontaining the remote metadata
§Returns
A vector of kvbm_physical::manager::LayoutHandle for the imported remote layouts
Sourcefn worker_count(&self) -> usize
fn worker_count(&self) -> usize
Get the number of workers.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".