Struct ownership_tracker::OwnershipTracker
source · pub struct OwnershipTracker {Show 14 fields
pub(crate) config: Config,
pub(crate) owned_objects: DashMap<ObjectId, Arc<RwLock<(OwnershipStatus, bool)>>>,
pub(crate) control_block_ownership_map: DashMap<EcbId, HostId>,
pub(crate) owned_cache_map: DashMap<ObjectId, ObjectCacheEntry>,
pub(crate) object_to_shared_cache_map: DashMap<ObjectId, Vec<(ObjectId, ObjectVersion)>>,
pub(crate) shared_cache_map: DashMap<ObjectId, CacheMappingEntry>,
pub(crate) ownership_map: DashMap<ObjectId, HostId>,
pub(crate) scheduler_client: Arc<Client>,
pub(crate) host_idx: Arc<Mutex<Option<u64>>>,
pub(crate) host_mapping: RwLock<HashMap<HostIdx, Hostname>>,
pub(crate) index_hits: AtomicUsize,
pub(crate) index_misses: AtomicUsize,
pub(crate) bucket_hits: AtomicUsize,
pub(crate) bucket_misses: AtomicUsize,
}Fields§
§config: Config§owned_objects: DashMap<ObjectId, Arc<RwLock<(OwnershipStatus, bool)>>>§control_block_ownership_map: DashMap<EcbId, HostId>§owned_cache_map: DashMap<ObjectId, ObjectCacheEntry>§ownership_map: DashMap<ObjectId, HostId>§scheduler_client: Arc<Client>§host_idx: Arc<Mutex<Option<u64>>>§host_mapping: RwLock<HashMap<HostIdx, Hostname>>§index_hits: AtomicUsize§index_misses: AtomicUsize§bucket_hits: AtomicUsize§bucket_misses: AtomicUsizeImplementations§
source§impl OwnershipTracker
impl OwnershipTracker
pub fn new(config: &Config) -> Self
pub fn get_ownership_tracker( maybe_config: Option<&Config> ) -> &'static OwnershipTracker
pub fn get_ordered_host_list(&self) -> Vec<HostIdx>
pub fn get_host_idx(&self) -> Option<u64>
pub fn get_own_host_id(&self) -> Option<HostId>
pub fn get_host_id_for_idx(&self, host_idx: HostIdx) -> Option<HostId>
pub fn get_num_hosts(&self) -> usize
pub fn mark_owned(&self, object_id: ObjectId) -> bool
pub fn mark_under_migration(&self, object_id: ObjectId)
pub fn mark_whomstoned( &self, object_id: ObjectId, whomstone_version: ObjectVersion )
pub fn mark_incoming(&self, object_id: ObjectId, first_version: ObjectVersion)
pub fn mark_migrated(&self, object_id: ObjectId)
pub fn object_is_owned(&self, object_id: ObjectId) -> bool
pub fn objects_are_owned(&self, object_ids: &Vec<ObjectId>) -> bool
pub fn object_is_incoming(&self, object_id: ObjectId) -> bool
pub fn insert_mapping_in_ownership_map( &self, object_id: ObjectId, owning_host: HostId )
pub fn compute_activation_site( &self, object_dependencies: Vec<ObjectId> ) -> Option<HostId>
pub async fn register_worker( &self, hostname: HostId, host_idx: Option<u64> ) -> Result<u64, String>
sourcepub fn get_host_idx_static(init_idx: Option<u64>) -> Option<u64>
pub fn get_host_idx_static(init_idx: Option<u64>) -> Option<u64>
Used for cheap retrieval of the current registered host’s idx, to be used when constructing new ECBs (for unique ECB ID creation).
pub async fn publish_object(&self, _iptr: &IPtr)
pub async fn publish_objects(&self, _iptrs: &Vec<IPtr>)
pub async fn object_is_published(&self, object_id: ObjectId) -> bool
pub(crate) fn get_scheduler_url(&self, endpoint: &str) -> String
pub fn get_remote_owner(&self, object_id: ObjectId) -> Option<HostId>
pub fn get_non_owners(&self, object_id: ObjectId) -> Vec<HostId>
pub fn get_remote_owner_with_idx( &self, object_id: ObjectId ) -> (HostIdx, HostId)
pub fn get_host_idx_for_id(&self, host_id: &HostId) -> Option<HostIdx>
pub fn insert_control_block_entry( &self, ecb_id: EcbId, owning_host_idx: HostIdx )
pub fn remove_control_block_entry( &self, ecb_id: EcbId ) -> Option<(EcbId, HostId)>
pub fn get_control_block_entry(&self, ecb_id: EcbId) -> Option<HostId>
pub fn get_cache_mapping_if_valid( &self, source_object_id: ObjectId ) -> Option<ObjectId>
pub fn was_cached( &self, source_object_id: ObjectId ) -> Option<(ObjectId, ObjectVersion)>
pub fn get_cache_mapping_if_incoming( &self, source_object_id: ObjectId ) -> Option<ObjectId>
pub fn mark_incoming_if_valid( &self, original_object_id: ObjectId, cacheable_version: ObjectVersion ) -> (bool, bool, Option<ObjectId>)
pub fn add_incoming_cache_mapping( &self, original_object_id: ObjectId, cached_version_object_id: ObjectId, cached_version_object_version: ObjectVersion ) -> bool
pub fn mark_invalidated( &self, original_object_id: ObjectId, cached_object_id: ObjectId, invalidation_version: ObjectVersion )
pub fn add_owned_cache_mapping( &self, original_object_id: ObjectId, cached_version_object_id: ObjectId, cached_version_object_version: ObjectVersion ) -> bool
pub fn remove_owned_cache_mapping( &self, original_object_id: ObjectId ) -> Option<(ObjectId, ObjectCacheEntry)>
pub fn get_cache_id_for_object_host_pair( &self, object_id: ObjectId, host: HostId ) -> Option<ObjectId>
pub fn dependency_is_local( &self, _dependency: &DownstreamTaskDependency ) -> bool
pub fn control_block_is_local(&self, ecb_id: &EcbId) -> bool
pub fn get_in_flight_args(&self, args: &Vec<NandoArgument>) -> Vec<ObjectId>
pub fn args_are_resolvable_locally( &self, _is_read_only: bool, _mutable_argument_indices: Option<&[usize]>, _intent_name: Option<&str>, _args: &mut Vec<NandoArgument> ) -> Schedulable
pub fn get_next_host(&self) -> Option<HostId>
pub async fn fetch_host_mapping(&self)
pub(crate) fn update_host_mapping(&self, host_idx: HostIdx, hostname: HostId)
pub fn print_cache_statistics(&self)
Auto Trait Implementations§
impl !RefUnwindSafe for OwnershipTracker
impl Send for OwnershipTracker
impl Sync for OwnershipTracker
impl Unpin for OwnershipTracker
impl !UnwindSafe for OwnershipTracker
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