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>,
/* 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>
Implementations
sourceimpl<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
pub fn new(
bins: usize,
config: &Option<AccountsIndexConfig>,
threads: usize
) -> Self
pub fn next_bucket_to_flush(&self) -> usize
pub fn background(
&self,
exit: Arc<AtomicBool>,
in_mem: Vec<Arc<InMemAccountsIndex<T>>>,
can_advance_age: bool
)
Trait Implementations
sourceimpl<T: IndexValue> Debug for BucketMapHolder<T>
impl<T: IndexValue> Debug for BucketMapHolder<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for BucketMapHolder<T>
impl<T> Send for BucketMapHolder<T>
impl<T> Sync for BucketMapHolder<T>
impl<T> Unpin for BucketMapHolder<T>
impl<T> UnwindSafe for BucketMapHolder<T>
Blanket Implementations
sourceimpl<T> AbiExample for T
impl<T> AbiExample for T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more