Struct solana_runtime::bucket_map_holder::BucketMapHolder
source · pub struct BucketMapHolder<T: IndexValue> {
pub disk: Option<BucketMap<(Slot, T)>>,
pub count_buckets_flushed: AtomicUsize,
pub age: AtomicU8,
pub stats: BucketMapHolderStats,
pub wait_dirty_or_aged: Arc<WaitableCondvar>,
pub threads: usize,
pub mem_budget_mb: Option<usize>,
pub ages_to_stay_in_cache: Age,
/* private fields */
}
Fields§
§disk: Option<BucketMap<(Slot, T)>>
§count_buckets_flushed: AtomicUsize
§age: AtomicU8
§stats: BucketMapHolderStats
§wait_dirty_or_aged: Arc<WaitableCondvar>
§threads: usize
§mem_budget_mb: Option<usize>
§ages_to_stay_in_cache: Age
how many ages should elapse from the last time an item is used where the item will remain in the cache
Implementations§
source§impl<T: IndexValue> BucketMapHolder<T>
impl<T: IndexValue> BucketMapHolder<T>
sourcepub fn is_disk_index_enabled(&self) -> bool
pub fn is_disk_index_enabled(&self) -> bool
is the accounts index using disk as a backing store
pub fn increment_age(&self)
pub fn future_age_to_flush(&self) -> Age
sourcepub fn get_startup(&self) -> bool
pub fn get_startup(&self) -> bool
used by bg processes to determine # active threads and how aggressively to flush
sourcepub fn set_startup(&self, value: bool)
pub fn set_startup(&self, value: bool)
startup=true causes: in mem to act in a way that flushes to disk asap startup=false is ‘normal’ operation
pub fn current_age(&self) -> Age
pub fn bucket_flushed_at_current_age(&self, can_advance_age: bool)
sourcepub fn all_buckets_flushed_at_current_age(&self) -> bool
pub fn all_buckets_flushed_at_current_age(&self) -> bool
have all buckets been flushed at the current age?
pub fn count_buckets_flushed(&self) -> usize
sourcepub fn maybe_advance_age(&self) -> bool
pub fn maybe_advance_age(&self) -> bool
if all buckets are flushed at the current age and time has elapsed, then advance age