pub struct BankExecutorCache {
pub executors: HashMap<Pubkey, BankExecutorCacheEntry>,
pub stats: Stats,
/* private fields */
}
Expand description
LFU Cache of executors which exists once per bank
Fields§
§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<dyn Executor>>
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 AbiExample for BankExecutorCache
impl AbiExample for BankExecutorCache
Source§impl Debug for BankExecutorCache
impl Debug for BankExecutorCache
Auto Trait Implementations§
impl !Freeze for BankExecutorCache
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more