Struct solana_runtime::accounts_index::AccountsIndex
source · [−]pub struct AccountsIndex<T: IndexValue> {
pub account_maps: Vec<RwLock<AccountMap<T>>>,
pub bin_calculator: PubkeyBinCalculator24,
pub removed_bank_ids: Mutex<HashSet<BankId>>,
pub scan_results_limit_bytes: Option<usize>,
/* private fields */
}
Fields
account_maps: Vec<RwLock<AccountMap<T>>>
bin_calculator: PubkeyBinCalculator24
removed_bank_ids: Mutex<HashSet<BankId>>
scan_results_limit_bytes: Option<usize>
when a scan’s accumulated data exceeds this limit, abort the scan
Implementations
pub fn get_account_read_entry_with_lock(
&self,
pubkey: &Pubkey,
lock: &RwLockReadGuard<'_, AccountMap<T>>
) -> Option<ReadAccountMapEntry<T>>
pub fn handle_dead_keys(
&self,
dead_keys: &[&Pubkey],
account_indexes: &AccountSecondaryIndexes
)
pub fn roots_and_ref_count(
&self,
locked_account_entry: &ReadAccountMapEntry<T>,
max: Option<Slot>
) -> (SlotList<T>, RefCount)
pub fn purge_exact<'a, C>(
&'a self,
pubkey: &Pubkey,
slots_to_purge: &'a C,
reclaims: &mut SlotList<T>
) -> bool where
C: Contains<'a, Slot>,
pub fn hold_range_in_memory<R>(&self, range: &R, start_holding: bool) where
R: RangeBounds<Pubkey> + Debug,
pub fn upsert(
&self,
slot: Slot,
pubkey: &Pubkey,
account_owner: &Pubkey,
account_data: &[u8],
account_indexes: &AccountSecondaryIndexes,
account_info: T,
reclaims: &mut SlotList<T>,
previous_slot_entry_was_cached: bool
)
pub fn clean_rooted_entries(
&self,
pubkey: &Pubkey,
reclaims: &mut SlotList<T>,
max_clean_root: Option<Slot>
)
Given a list of slots, return a new list of only the slots that are rooted
Remove the slot when the storage for the slot is freed Accounts no longer reference this slot.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for AccountsIndex<T>
impl<T> Send for AccountsIndex<T>
impl<T> Sync for AccountsIndex<T>
impl<T> Unpin for AccountsIndex<T>
impl<T> !UnwindSafe for AccountsIndex<T>
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more