Struct strymon_coordinator::handler::CoordinatorRef
[−]
[src]
pub struct CoordinatorRef { /* fields omitted */ }
A cloneable reference to the coordinator instance, tracking any state created by this handle.
The initial handle is obtained by creating a new coordinator instance with
Coordinator::new
.
Note that cloning this handle will not clone any tracked state.
Methods
impl CoordinatorRef
[src]
pub fn submission(
&self,
req: Submission
) -> Box<Future<Item = JobId, Error = SubmissionError>>
[src]
&self,
req: Submission
) -> Box<Future<Item = JobId, Error = SubmissionError>>
Handles a new job submission request.
The returned future resolves with the allocated job identifier once all processes have registered themselves at the coordinator (or when an error occurs).
pub fn termination(
&self,
req: Termination
) -> Box<Future<Item = (), Error = TerminationError>>
[src]
&self,
req: Termination
) -> Box<Future<Item = (), Error = TerminationError>>
Handles a new job termination request.
The returned future resolves once all executors have acknowledged the request, or the first executor has reported an error.
pub fn add_executor(&self, req: AddExecutor, tx: Outgoing) -> ExecutorId
[src]
Registers a new executor instance. Returns the newly assigned identifier for this executor.
pub fn add_worker_group(
&self,
id: JobId,
group: usize
) -> Box<Future<Item = JobToken, Error = WorkerGroupError>>
[src]
&self,
id: JobId,
group: usize
) -> Box<Future<Item = JobToken, Error = WorkerGroupError>>
Marks job worker group (e.g. a process hosting some worker threads) as ready.
The returned future resolves with the job identifier for the newly spawned job once all other worker groups have registered themselves, or if an error occured.
pub fn publish(&self, req: Publish) -> Result<Topic, PublishError>
[src]
Creates a new publication in the catalog. Returns the created topic.
pub fn unpublish(
&self,
job: JobToken,
topic_id: TopicId
) -> Result<(), UnpublishError>
[src]
&self,
job: JobToken,
topic_id: TopicId
) -> Result<(), UnpublishError>
Removes a publication from the catalog.
pub fn subscribe(
&self,
req: Subscribe
) -> Box<Future<Item = Topic, Error = SubscribeError>>
[src]
&self,
req: Subscribe
) -> Box<Future<Item = Topic, Error = SubscribeError>>
Handles a new subscription request.
The returned future resolves either immediately for non-blocking lookups, or once a matching topic is created by a later publication.
pub fn unsubscribe(
&self,
job: JobToken,
topic_id: TopicId
) -> Result<(), UnsubscribeError>
[src]
&self,
job: JobToken,
topic_id: TopicId
) -> Result<(), UnsubscribeError>
Removes a subscription from the catalog.
pub fn lookup(&self, name: &str) -> Result<Topic, ()>
[src]
Performs a non-blocking, non-subscribing topic lookup.
pub fn catalog_request(&self, req: RequestBuf<CatalogRPC>) -> Result<()>
[src]
Forwards an encoded query to the catalog.
The catalog which will decode and execute the query and respond to it immediately. Might fail if the request could not be decoded.
Trait Implementations
impl Clone for CoordinatorRef
[src]
Performs a (shallow) clone to obtain a new handle to the coordinator.
This will not clone any state tracked by the self
.
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Drop for CoordinatorRef
[src]
Removes any state associated with the client owning this handle.