Struct scheduling::activation_router::ActivationRouter
source · 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
impl ActivationRouter
pub fn new( config: Config, host_id: HostId, location_manager: AsyncArc<LocationManager>, async_rt_manager: Arc<AsyncRuntimeManager> ) -> Self
pub fn healthcheck_all_threads(&self)
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>
pub fn register_callback_fns(&self)
pub fn register_task_fwd_fn(&self)
pub fn register_tasks_fwd_to_fn(&self)
pub fn register_task_completion_fwd_fn(&self)
pub async fn healthcheck(&self) -> &'static str
async fn can_execute_locally( &self, activation_intent: &mut NandoActivationIntent, rewrite_cached_args: bool ) -> bool
fn get_scheduler_url(&self, endpoint: &str) -> String
fn get_worker_url(&self, target_host: &HostId, endpoint: &str) -> String
async fn ask_scheduler( &self, activation_intent_request: &NandoActivationIntent ) -> HostId
async fn ask_scheduler_for_location( &self, activation_intent_request: &NandoActivationIntent ) -> HostId
async fn forward_schedule_request( &self, activation_intent_request: &NandoActivationIntent, target_host: HostId ) -> (Vec<ActivationOutput>, Vec<(ObjectId, ObjectVersion)>)
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>
pub fn add_cache_entry( &self, original_object_id: ObjectId, cache_id: ObjectId, cache_version: ObjectVersion, target_host_idx: HostIdx ) -> Result<(), ()>
fn invalidate_intent_dependencies( &self, invalidation_intent: &mut NandoActivationIntent ) -> Result<(Vec<ActivationOutput>, Vec<(ObjectId, ObjectVersion)>), String>
pub async fn try_execute_spawned_task( &self, spawned_task: SpawnedTask ) -> Result<(Vec<ActivationOutput>, Vec<(ObjectId, ObjectVersion)>), String>
pub async fn try_schedule_task_graph( &self, spawned_tasks: Vec<SpawnedTask> ) -> Result<Vec<(Vec<ActivationOutput>, Vec<(ObjectId, ObjectVersion)>)>, String>
async fn trigger_invalidation_task_completion( &self, invalidation_task: SpawnedTask )
pub async fn whomstone_and_move_object( &self, object_id: ObjectId, new_host: HostId ) -> Result<ObjectVersion, String>
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>
pub async fn whomstone_object( &self, object_id: ObjectId, new_host: HostId, get_signature: bool ) -> Result<(ObjectVersion, Option<Vec<u8>>), String>
pub async fn trigger_whomstoned_object_move( &self, object_id: ObjectId, serialized_foreign_signature: &Vec<u8>, new_host: HostId ) -> Result<(), String>
pub async fn assume_ownership( &self, object_id: ObjectId, first_version: ObjectVersion ) -> Result<Vec<u8>, String>
pub async fn get_epic_status( &self, get_status_request: GetEpicStatusRequest ) -> Result<EpicStatus, String>
pub async fn get_epic_result( &self, get_status_request: AwaitEpicResultRequest ) -> Result<EpicStatus, String>
pub async fn spawn_caching_tasks( &self, target_host: HostId, cacheable_objects: &Vec<(ObjectId, ObjectVersion)> )
async fn wait_for_object_or_cache(&self, object_id: ObjectId)
pub async fn forward_spawned_task(&self, spawned_task: SpawnedTask)
async fn forward_spawned_task_to( &self, spawned_task: SpawnedTask, target_host: HostId )
async fn forward_spawned_tasks_to( &self, spawned_tasks: Vec<SpawnedTask>, target_host: Option<HostId> )
pub async fn forward_task_completion( &self, task_completion_notification: TaskCompletionNotification )
pub fn store_remote_allocations(&self, allocations: Vec<(HostIdx, IPtr)>)
pub async fn handle_task_completion( &self, completed_task: EcbId, tasks_to_notify: Vec<(DownstreamTaskDependency, Option<NandoResult>)> )
pub async fn fetch_host_mapping(&self)
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
impl NetServiceInterface for ActivationRouter
fn populate_routes(path_prefix: &str, router: Router) -> Router
Auto Trait Implementations§
impl !RefUnwindSafe for ActivationRouter
impl Send for ActivationRouter
impl Sync for ActivationRouter
impl Unpin for ActivationRouter
impl !UnwindSafe for ActivationRouter
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request