[][src]Trait arcon::prelude::lookup::ActorLookup

pub trait ActorLookup: Clone {
    fn insert(
        &mut self,
        actor: ActorRef,
        path: PathResolvable
    ) -> Option<ActorRef>;
fn contains(&self, path: &PathResolvable) -> bool;
fn get_by_uuid(&self, id: &Uuid) -> Option<&ActorRef>;
fn get_by_named_path(&self, path: &Vec<String>) -> Option<&ActorRef>;
fn get_mut_by_uuid(&mut self, id: &Uuid) -> Option<&mut ActorRef>;
fn get_mut_by_named_path(
        &mut self,
        path: &Vec<String>
    ) -> Option<&mut ActorRef>;
fn remove(&mut self, actor: ActorRef) -> usize;
fn remove_by_uuid(&mut self, id: &Uuid) -> bool;
fn remove_by_named_path(&mut self, path: &Vec<String>) -> bool; fn get_by_actor_path(&self, path: &ActorPath) -> Option<&ActorRef> { ... }
fn get_mut_by_actor_path(
        &mut self,
        path: &ActorPath
    ) -> Option<&mut ActorRef> { ... }
fn cleanup(&mut self) -> usize { ... } }

Required methods

fn insert(&mut self, actor: ActorRef, path: PathResolvable) -> Option<ActorRef>

Inserts or replaces the path in the lookup structure. If an entry already exists, it is removed and returned before being replaced.

fn contains(&self, path: &PathResolvable) -> bool

Returns true if the evaluated path is already stored.

fn get_by_uuid(&self, id: &Uuid) -> Option<&ActorRef>

fn get_by_named_path(&self, path: &Vec<String>) -> Option<&ActorRef>

fn get_mut_by_uuid(&mut self, id: &Uuid) -> Option<&mut ActorRef>

fn get_mut_by_named_path(&mut self, path: &Vec<String>) -> Option<&mut ActorRef>

fn remove(&mut self, actor: ActorRef) -> usize

Removes all entries that point to the provided actor, returning how many were removed (most likely O(n), subject to implementation details)

fn remove_by_uuid(&mut self, id: &Uuid) -> bool

Removes the value at the given key, returning true if it existed.

fn remove_by_named_path(&mut self, path: &Vec<String>) -> bool

Removes the value at the given key, returning true if it existed.

Loading content...

Provided methods

fn get_by_actor_path(&self, path: &ActorPath) -> Option<&ActorRef>

fn get_mut_by_actor_path(&mut self, path: &ActorPath) -> Option<&mut ActorRef>

fn cleanup(&mut self) -> usize

Performs cleanup on this lookup table, returning how many entries were affected.

Loading content...

Implementors

impl ActorLookup for ActorStore[src]

fn insert(&mut self, actor: ActorRef, path: PathResolvable) -> Option<ActorRef>[src]

Inserts or replaces the path in the lookup structure. If an entry already exists, it is removed and returned before being replaced.

Loading content...