pub struct BankExecutorCache {
capacity: usize,
current_epoch: Epoch,
pub executors: HashMap<Pubkey, BankExecutorCacheEntry>,
pub stats: Stats,
}
Expand description
LFU Cache of executors which exists once per bank
Fields§
§capacity: usize
§current_epoch: Epoch
§executors: HashMap<Pubkey, BankExecutorCacheEntry>
§stats: Stats
Implementations§
source§impl BankExecutorCache
impl BankExecutorCache
pub fn new(max_capacity: usize, current_epoch: Epoch) -> Self
pub fn new_from_parent_bank_executors( parent_bank_executors: &BankExecutorCache, current_epoch: Epoch ) -> Self
pub fn get(&self, pubkey: &Pubkey) -> Option<Arc<LoadedProgram>>
pub fn put( &mut self, executors: impl Iterator<Item = (Pubkey, Arc<LoadedProgram>)> )
pub fn remove(&mut self, pubkey: &Pubkey) -> Option<BankExecutorCacheEntry>
pub fn clear(&mut self)
pub fn get_primer_count_upper_bound_inclusive(counts: &[(&Pubkey, u64)]) -> u64
pub fn get_primer_counts( counts: &[(&Pubkey, u64)], num_counts: usize ) -> Vec<u64>
Trait Implementations§
source§impl Debug for BankExecutorCache
impl Debug for BankExecutorCache
Auto Trait Implementations§
impl RefUnwindSafe for BankExecutorCache
impl Send for BankExecutorCache
impl Sync for BankExecutorCache
impl Unpin for BankExecutorCache
impl UnwindSafe for BankExecutorCache
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