pub struct CachedExecutors {
pub executors: HashMap<Pubkey, CachedExecutorsEntry>,
pub stats: Stats,
/* private fields */
}
Expand description
LFU Cache of executors with single-epoch memory of usage counts
Fields§
§executors: HashMap<Pubkey, CachedExecutorsEntry>
§stats: Stats
Implementations§
source§impl CachedExecutors
impl CachedExecutors
pub fn new(max_capacity: usize, current_epoch: Epoch) -> Self
pub fn new_from_parent_bank_executors( parent_bank_executors: &CachedExecutors, current_epoch: Epoch ) -> Self
pub fn get(&self, pubkey: &Pubkey) -> Option<Arc<dyn Executor>>
pub fn put(&mut self, executors: &[(&Pubkey, Arc<dyn Executor>)])
pub fn remove(&mut self, pubkey: &Pubkey) -> Option<CachedExecutorsEntry>
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 AbiExample for CachedExecutors
impl AbiExample for CachedExecutors
source§impl Debug for CachedExecutors
impl Debug for CachedExecutors
Auto Trait Implementations§
impl !RefUnwindSafe for CachedExecutors
impl Send for CachedExecutors
impl Sync for CachedExecutors
impl Unpin for CachedExecutors
impl !UnwindSafe for CachedExecutors
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