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