Trait timely::worker::AsWorker[][src]

pub trait AsWorker: Scheduler {
    fn config(&self) -> &Config;
fn index(&self) -> usize;
fn peers(&self) -> usize;
fn allocate<T: Data>(
        &mut self,
        identifier: usize,
        address: &[usize]
    ) -> (Vec<Box<dyn Push<Message<T>>>>, Box<dyn Pull<Message<T>>>);
fn pipeline<T: 'static>(
        &mut self,
        identifier: usize,
        address: &[usize]
    ) -> (ThreadPusher<Message<T>>, ThreadPuller<Message<T>>);
fn new_identifier(&mut self) -> usize;
fn log_register(&self) -> RefMut<'_, Registry<WorkerIdentifier>>; fn logging(&self) -> Option<TimelyLogger> { ... } }

Methods provided by the root Worker.

These methods are often proxied by child scopes, and this trait provides access.

Required methods

fn config(&self) -> &Config[src]

Returns the worker configuration parameters.

fn index(&self) -> usize[src]

Index of the worker among its peers.

fn peers(&self) -> usize[src]

Number of peer workers.

fn allocate<T: Data>(
    &mut self,
    identifier: usize,
    address: &[usize]
) -> (Vec<Box<dyn Push<Message<T>>>>, Box<dyn Pull<Message<T>>>)
[src]

Allocates a new channel from a supplied identifier and address.

The identifier is used to identify the underlying channel and route its data. It should be distinct from other identifiers passed used for allocation, but can otherwise be arbitrary.

The address should specify a path to an operator that should be scheduled in response to the receipt of records on the channel. Most commonly, this would be the address of the target of the channel.

fn pipeline<T: 'static>(
    &mut self,
    identifier: usize,
    address: &[usize]
) -> (ThreadPusher<Message<T>>, ThreadPuller<Message<T>>)
[src]

Constructs a pipeline channel from the worker to itself.

By default this method uses the native channel allocation mechanism, but the expectation is that this behavior will be overriden to be more efficient.

fn new_identifier(&mut self) -> usize[src]

Allocates a new worker-unique identifier.

fn log_register(&self) -> RefMut<'_, Registry<WorkerIdentifier>>[src]

Provides access to named logging streams.

Loading content...

Provided methods

fn logging(&self) -> Option<TimelyLogger>[src]

Provides access to the timely logging stream.

Loading content...

Implementors

impl<'a, G, T> AsWorker for Child<'a, G, T> where
    G: ScopeParent,
    T: Timestamp + Refines<G::Timestamp>, 
[src]

impl<A: Allocate> AsWorker for Worker<A>[src]

Loading content...