pub struct AccountsIndexStorage<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> {
pub storage: Arc<BucketMapHolder<T, U>>,
pub in_mem: Vec<Arc<InMemAccountsIndex<T, U>>>,
/* private fields */
}
Expand description
Manages the lifetime of the background processing threads.
Fields§
§storage: Arc<BucketMapHolder<T, U>>
§in_mem: Vec<Arc<InMemAccountsIndex<T, U>>>
Implementations§
Source§impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> AccountsIndexStorage<T, U>
impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> AccountsIndexStorage<T, U>
Sourcepub fn set_startup(&self, startup: Startup)
pub fn set_startup(&self, startup: Startup)
startup=true causes: in mem to act in a way that flushes to disk asap also creates some additional bg threads to facilitate flushing to disk asap startup=false is ‘normal’ operation
Sourcepub fn get_startup_remaining_items_to_flush_estimate(&self) -> usize
pub fn get_startup_remaining_items_to_flush_estimate(&self) -> usize
estimate how many items are still needing to be flushed to the disk cache.
Sourcepub fn new(
bins: usize,
config: &Option<AccountsIndexConfig>,
exit: Arc<AtomicBool>,
) -> Self
pub fn new( bins: usize, config: &Option<AccountsIndexConfig>, exit: Arc<AtomicBool>, ) -> Self
allocate BucketMapHolder and InMemAccountsIndex[]
Trait Implementations§
Source§impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> Debug for AccountsIndexStorage<T, U>
impl<T: IndexValue, U: DiskIndexValue + From<T> + Into<T>> Debug for AccountsIndexStorage<T, U>
Auto Trait Implementations§
impl<T, U> !Freeze for AccountsIndexStorage<T, U>
impl<T, U> !RefUnwindSafe for AccountsIndexStorage<T, U>
impl<T, U> Send for AccountsIndexStorage<T, U>
impl<T, U> Sync for AccountsIndexStorage<T, U>
impl<T, U> Unpin for AccountsIndexStorage<T, U>
impl<T, U> !UnwindSafe for AccountsIndexStorage<T, U>
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