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>§object_to_shared_cache_map: DashMap<ObjectId, Vec<(ObjectId, ObjectVersion)>>§shared_cache_map: DashMap<ObjectId, CacheMappingEntry>§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: AtomicUsize

Implementations§

source§

impl OwnershipTracker

source

pub fn new(config: &Config) -> Self

source

pub fn get_ownership_tracker( maybe_config: Option<&Config> ) -> &'static OwnershipTracker

source

pub fn get_ordered_host_list(&self) -> Vec<HostIdx>

source

pub fn get_host_idx(&self) -> Option<u64>

source

pub fn get_own_host_id(&self) -> Option<HostId>

source

pub fn get_host_id_for_idx(&self, host_idx: HostIdx) -> Option<HostId>

source

pub fn get_num_hosts(&self) -> usize

source

pub fn mark_owned(&self, object_id: ObjectId) -> bool

source

pub fn mark_under_migration(&self, object_id: ObjectId)

source

pub fn mark_whomstoned( &self, object_id: ObjectId, whomstone_version: ObjectVersion )

source

pub fn mark_incoming(&self, object_id: ObjectId, first_version: ObjectVersion)

source

pub fn mark_migrated(&self, object_id: ObjectId)

source

pub fn object_is_owned(&self, object_id: ObjectId) -> bool

source

pub fn objects_are_owned(&self, object_ids: &Vec<ObjectId>) -> bool

source

pub fn object_is_incoming(&self, object_id: ObjectId) -> bool

source

pub fn insert_mapping_in_ownership_map( &self, object_id: ObjectId, owning_host: HostId )

source

pub fn compute_activation_site( &self, object_dependencies: Vec<ObjectId> ) -> Option<HostId>

source

pub async fn register_worker( &self, hostname: HostId, host_idx: Option<u64> ) -> Result<u64, String>

source

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).

source

pub async fn publish_object(&self, _iptr: &IPtr)

source

pub async fn publish_objects(&self, _iptrs: &Vec<IPtr>)

source

pub async fn object_is_published(&self, object_id: ObjectId) -> bool

source

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

source

pub fn get_remote_owner(&self, object_id: ObjectId) -> Option<HostId>

source

pub fn get_non_owners(&self, object_id: ObjectId) -> Vec<HostId>

source

pub fn get_remote_owner_with_idx( &self, object_id: ObjectId ) -> (HostIdx, HostId)

source

pub fn get_host_idx_for_id(&self, host_id: &HostId) -> Option<HostIdx>

source

pub fn insert_control_block_entry( &self, ecb_id: EcbId, owning_host_idx: HostIdx )

source

pub fn remove_control_block_entry( &self, ecb_id: EcbId ) -> Option<(EcbId, HostId)>

source

pub fn get_control_block_entry(&self, ecb_id: EcbId) -> Option<HostId>

source

pub fn get_cache_mapping_if_valid( &self, source_object_id: ObjectId ) -> Option<ObjectId>

source

pub fn was_cached( &self, source_object_id: ObjectId ) -> Option<(ObjectId, ObjectVersion)>

source

pub fn get_cache_mapping_if_incoming( &self, source_object_id: ObjectId ) -> Option<ObjectId>

source

pub fn mark_incoming_if_valid( &self, original_object_id: ObjectId, cacheable_version: ObjectVersion ) -> (bool, bool, Option<ObjectId>)

source

pub fn add_incoming_cache_mapping( &self, original_object_id: ObjectId, cached_version_object_id: ObjectId, cached_version_object_version: ObjectVersion ) -> bool

source

pub fn mark_invalidated( &self, original_object_id: ObjectId, cached_object_id: ObjectId, invalidation_version: ObjectVersion )

source

pub fn add_owned_cache_mapping( &self, original_object_id: ObjectId, cached_version_object_id: ObjectId, cached_version_object_version: ObjectVersion ) -> bool

source

pub fn remove_owned_cache_mapping( &self, original_object_id: ObjectId ) -> Option<(ObjectId, ObjectCacheEntry)>

source

pub fn invalidate_or_remove_shared_cache_entry( &self, original_object_id: ObjectId, cached_version_object_id: ObjectId ) -> Option<(ObjectId, HostId)>

source

pub fn add_shared_cache_entry( &self, original_object_id: ObjectId, cached_version_object_id: ObjectId, cache_version: ObjectVersion, owning_host: HostIdx ) -> Result<(), ()>

source

pub fn get_shared_caches_for_object( &self, object_id: ObjectId ) -> Vec<(ObjectId, ObjectVersion)>

source

pub fn get_owner_of_shared_cache( &self, cache_object_id: ObjectId ) -> Option<HostId>

source

pub fn get_last_owner_of_shared_cache( &self, cache_object_id: ObjectId ) -> Option<HostId>

source

pub fn get_cache_id_for_object_host_pair( &self, object_id: ObjectId, host: HostId ) -> Option<ObjectId>

source

pub fn dependency_is_local( &self, _dependency: &DownstreamTaskDependency ) -> bool

source

pub fn control_block_is_local(&self, ecb_id: &EcbId) -> bool

source

pub fn get_in_flight_args(&self, args: &Vec<NandoArgument>) -> Vec<ObjectId>

source

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

source

pub fn get_next_host(&self) -> Option<HostId>

source

pub async fn fetch_host_mapping(&self)

source

pub(crate) fn update_host_mapping(&self, host_idx: HostIdx, hostname: HostId)

source

pub fn print_cache_statistics(&self)

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, 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