pub struct ActivationRouter {
    config: Config,
    host_id: HostId,
    location_manager: Arc<LocationManager>,
    scheduler_client: Arc<Client>,
    worker_client: Arc<WorkerRpcClient>,
    host_idx: Arc<Mutex<Option<u64>>>,
    async_rt_manager: Arc<AsyncRuntimeManager>,
}

Fields§

§config: Config§host_id: HostId§location_manager: Arc<LocationManager>§scheduler_client: Arc<Client>§worker_client: Arc<WorkerRpcClient>§host_idx: Arc<Mutex<Option<u64>>>§async_rt_manager: Arc<AsyncRuntimeManager>

Implementations§

source§

impl ActivationRouter

source

pub fn new( config: Config, host_id: HostId, location_manager: AsyncArc<LocationManager>, async_rt_manager: Arc<AsyncRuntimeManager> ) -> Self

source

pub fn healthcheck_all_threads(&self)

source

pub fn get_activation_router( config: Option<Config>, host_id: Option<HostId>, location_manager: Option<AsyncArc<LocationManager>>, async_rt_manager: Option<Arc<AsyncRuntimeManager>> ) -> &'static Arc<ActivationRouter>

source

pub fn register_callback_fns(&self)

source

pub fn register_task_fwd_fn(&self)

source

pub fn register_tasks_fwd_to_fn(&self)

source

pub fn register_task_completion_fwd_fn(&self)

source

pub async fn healthcheck(&self) -> &'static str

source

async fn can_execute_locally( &self, activation_intent: &mut NandoActivationIntent, rewrite_cached_args: bool ) -> bool

source

fn get_scheduler_url(&self, endpoint: &str) -> String

source

fn get_worker_url(&self, target_host: &HostId, endpoint: &str) -> String

source

async fn ask_scheduler( &self, activation_intent_request: &NandoActivationIntent ) -> HostId

source

async fn ask_scheduler_for_location( &self, activation_intent_request: &NandoActivationIntent ) -> HostId

source

async fn forward_schedule_request( &self, activation_intent_request: &NandoActivationIntent, target_host: HostId ) -> (Vec<ActivationOutput>, Vec<(ObjectId, ObjectVersion)>)

source

pub async fn try_execute_nando( &self, activation_intent_request: NandoActivationIntent, await_epic_result: bool, with_plan: Option<String> ) -> Result<(Vec<ActivationOutput>, Vec<(ObjectId, ObjectVersion)>), String>

source

pub fn add_cache_entry( &self, original_object_id: ObjectId, cache_id: ObjectId, cache_version: ObjectVersion, target_host_idx: HostIdx ) -> Result<(), ()>

source

fn invalidate_intent_dependencies( &self, invalidation_intent: &mut NandoActivationIntent ) -> Result<(Vec<ActivationOutput>, Vec<(ObjectId, ObjectVersion)>), String>

source

pub async fn try_execute_spawned_task( &self, spawned_task: SpawnedTask ) -> Result<(Vec<ActivationOutput>, Vec<(ObjectId, ObjectVersion)>), String>

source

pub async fn try_schedule_task_graph( &self, spawned_tasks: Vec<SpawnedTask> ) -> Result<Vec<(Vec<ActivationOutput>, Vec<(ObjectId, ObjectVersion)>)>, String>

source

async fn trigger_invalidation_task_completion( &self, invalidation_task: SpawnedTask )

source

pub async fn whomstone_and_move_object( &self, object_id: ObjectId, new_host: HostId ) -> Result<ObjectVersion, String>

source

pub async fn whomstone_and_move_cache_object( &self, cache_object_id: ObjectId, src_object_id: ObjectId, new_host: HostId, target_host_idx: HostIdx ) -> Result<ObjectVersion, String>

source

pub async fn whomstone_object( &self, object_id: ObjectId, new_host: HostId, get_signature: bool ) -> Result<(ObjectVersion, Option<Vec<u8>>), String>

source

pub async fn trigger_whomstoned_object_move( &self, object_id: ObjectId, serialized_foreign_signature: &Vec<u8>, new_host: HostId ) -> Result<(), String>

source

pub async fn assume_ownership( &self, object_id: ObjectId, first_version: ObjectVersion ) -> Result<Vec<u8>, String>

source

pub async fn get_epic_status( &self, get_status_request: GetEpicStatusRequest ) -> Result<EpicStatus, String>

source

pub async fn get_epic_result( &self, get_status_request: AwaitEpicResultRequest ) -> Result<EpicStatus, String>

source

pub async fn spawn_caching_tasks( &self, target_host: HostId, cacheable_objects: &Vec<(ObjectId, ObjectVersion)> )

source

async fn wait_for_object_or_cache(&self, object_id: ObjectId)

source

pub async fn forward_spawned_task(&self, spawned_task: SpawnedTask)

source

async fn forward_spawned_task_to( &self, spawned_task: SpawnedTask, target_host: HostId )

source

async fn forward_spawned_tasks_to( &self, spawned_tasks: Vec<SpawnedTask>, target_host: Option<HostId> )

source

pub async fn forward_task_completion( &self, task_completion_notification: TaskCompletionNotification )

source

pub fn store_remote_allocations(&self, allocations: Vec<(HostIdx, IPtr)>)

source

pub async fn handle_task_completion( &self, completed_task: EcbId, tasks_to_notify: Vec<(DownstreamTaskDependency, Option<NandoResult>)> )

source

pub async fn fetch_host_mapping(&self)

source

pub async fn add_valid_cache_mapping( &self, original_object_id: ObjectId, cached_object_id: ObjectId, cache_version: ObjectVersion, original_object_owner: HostIdx )

Trait Implementations§

source§

impl NetServiceInterface for ActivationRouter

source§

fn populate_routes(path_prefix: &str, router: Router) -> Router

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more