Struct figaro::orchestration::host_manager::HostManager
source · pub(crate) struct HostManager {
idx_generator: AtomicU64,
host_map: RwLock<HashMap<HostIdx, Arc<Host>>>,
hostname_list: RwLock<Vec<Hostname>>,
}Fields§
§idx_generator: AtomicU64§host_map: RwLock<HashMap<HostIdx, Arc<Host>>>§hostname_list: RwLock<Vec<Hostname>>Implementations§
source§impl HostManager
impl HostManager
fn new() -> Self
pub(crate) fn get_host_manager() -> &'static Arc<HostManager>
pub(crate) fn number_of_registered_hosts(&self) -> usize
pub fn insert_host_with_idx( &self, host_idx: HostIdx, hostname: String ) -> Result<HostIdx, HostManagementError>
pub fn insert_host( &self, hostname: Hostname ) -> Result<HostIdx, HostManagementError>
pub fn get_hostname_by_idx(&self, host_idx: HostIdx) -> Option<Hostname>
pub fn get_hostname_projection(&self) -> HashMap<HostIdx, Hostname>
pub fn get_num_workers(&self) -> usize
pub fn reset_state(&self)
Auto Trait Implementations§
impl !RefUnwindSafe for HostManager
impl Send for HostManager
impl Sync for HostManager
impl Unpin for HostManager
impl UnwindSafe for HostManager
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