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
sourceimpl 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>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Trait Implementations
sourceimpl AbiExample for CachedExecutors
impl AbiExample for CachedExecutors
sourceimpl 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
sourceimpl<T> AbiExample for T
impl<T> AbiExample for T
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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