pub(crate) struct BankCreationFreezingProgress {
bank_creation_count: AtomicU32,
bank_freeze_or_destruction_count: AtomicU32,
bank_frozen_or_destroyed: Arc<WaitableCondvar>,
last_report: AtomicInterval,
}
Expand description
Keeps track of when all banks that were started as of a known point in time have been frozen or otherwise destroyed. When ‘bank_freeze_or_destruction_count’ exceeds a prior value of ‘bank_creation_count’, this means that we can know all banks that began loading accounts have completed as of the prior value of ‘bank_creation_count’.
Fields§
§bank_creation_count: AtomicU32
Incremented each time a bank is created. Starting now, this bank could be finding accounts in the index and loading them from accounts db.
bank_freeze_or_destruction_count: AtomicU32
Incremented each time a bank is frozen or destroyed. At this point, this bank has completed all account loading.
bank_frozen_or_destroyed: Arc<WaitableCondvar>
enable waiting for bank_freeze_or_destruction_count to increment
last_report: AtomicInterval
Implementations§
source§impl BankCreationFreezingProgress
impl BankCreationFreezingProgress
pub(crate) fn increment_bank_frozen_or_destroyed(&self)
pub(crate) fn get_bank_frozen_or_destroyed_count(&self) -> u32
pub(crate) fn increment_bank_creation_count(&self)
pub(crate) fn get_bank_creation_count(&self) -> u32
pub(crate) fn report(&self)
Trait Implementations§
source§impl Debug for BankCreationFreezingProgress
impl Debug for BankCreationFreezingProgress
source§impl Default for BankCreationFreezingProgress
impl Default for BankCreationFreezingProgress
source§fn default() -> BankCreationFreezingProgress
fn default() -> BankCreationFreezingProgress
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for BankCreationFreezingProgress
impl Send for BankCreationFreezingProgress
impl Sync for BankCreationFreezingProgress
impl Unpin for BankCreationFreezingProgress
impl UnwindSafe for BankCreationFreezingProgress
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