struct IndexedDBEnvironment<E: KvsEngine> {Show 14 fields
engine: E,
manager_sender: GenericSender<IndexedDBThreadMsg>,
transactions: FxHashMap<u64, KvsTransaction>,
next_created_seq: u64,
txn_info: FxHashMap<u64, TxnInfo>,
queued_readwrite: VecDeque<u64>,
queued_readonly: VecDeque<u64>,
queued_readwrite_set: FxHashSet<u64>,
queued_readonly_set: FxHashSet<u64>,
running_readwrite: Option<u64>,
running_readonly: HashSet<u64>,
handled_next_unhandled_request_id: FxHashMap<u64, u64>,
handled_pending: FxHashMap<u64, HashSet<u64>>,
pending_commit_callbacks: FxHashMap<u64, Vec<GenericCallback<TxnCompleteMsg>>>,
}Fields§
§engine: E§manager_sender: GenericSender<IndexedDBThreadMsg>§transactions: FxHashMap<u64, KvsTransaction>§next_created_seq: u64§txn_info: FxHashMap<u64, TxnInfo>§queued_readwrite: VecDeque<u64>§queued_readonly: VecDeque<u64>§queued_readwrite_set: FxHashSet<u64>§queued_readonly_set: FxHashSet<u64>§running_readwrite: Option<u64>§running_readonly: HashSet<u64>§handled_next_unhandled_request_id: FxHashMap<u64, u64>§handled_pending: FxHashMap<u64, HashSet<u64>>§pending_commit_callbacks: FxHashMap<u64, Vec<GenericCallback<TxnCompleteMsg>>>Implementations§
Source§impl<E: KvsEngine> IndexedDBEnvironment<E>
impl<E: KvsEngine> IndexedDBEnvironment<E>
fn new( engine: E, manager_sender: GenericSender<IndexedDBThreadMsg>, ) -> IndexedDBEnvironment<E>
fn register_transaction( &mut self, txn: u64, mode: IndexedDBTxnMode, scope: Vec<String>, )
fn scopes_overlap(a: &TxnInfo, b: &TxnInfo) -> bool
fn earlier_overlapping_live_exists<F>(&self, txn: u64, predicate: F) -> bool
fn can_start_by_spec(&self, txn: u64) -> bool
fn enqueue_txn(&mut self, txn: u64, mode: &IndexedDBTxnMode)
fn queue_operation( &mut self, store_name: &str, serial_number: u64, mode: IndexedDBTxnMode, operation: AsyncOperation, )
Sourcefn schedule_transactions(&mut self, origin: ImmutableOrigin, db_name: &str)
fn schedule_transactions(&mut self, origin: ImmutableOrigin, db_name: &str)
fn start_transaction( &mut self, origin: ImmutableOrigin, db_name: String, txn: u64, sender: Option<GenericSender<BackendResult<()>>>, )
fn mark_request_handled(&mut self, txn: u64, request_id: u64)
fn can_notify_txn_maybe_commit(&self, txn: u64) -> bool
fn can_commit_now(&self, txn: u64) -> bool
fn queue_pending_commit_callback( &mut self, txn: u64, callback: GenericCallback<TxnCompleteMsg>, )
fn take_pending_commit_callbacks( &mut self, txn: u64, ) -> Vec<GenericCallback<TxnCompleteMsg>>
fn maybe_commit_candidates(&self) -> Vec<u64>
fn finish_transaction(&mut self, txn: u64)
fn abort_transaction(&mut self, txn: u64)
fn key_generator_current_number(&self, store_name: &str) -> Option<i32>
fn key_path(&self, store_name: &str) -> Option<KeyPath>
fn object_store_names(&self) -> DbResult<Vec<String>>
fn indexes(&self, store_name: &str) -> DbResult<Vec<IndexedDBIndex>>
fn create_index( &self, store_name: &str, index_name: String, key_path: KeyPath, unique: bool, multi_entry: bool, ) -> DbResult<CreateObjectResult>
fn delete_index(&self, store_name: &str, index_name: String) -> DbResult<()>
fn create_object_store( &mut self, store_name: &str, key_path: Option<KeyPath>, auto_increment: bool, ) -> DbResult<CreateObjectResult>
fn delete_object_store(&mut self, store_name: &str) -> DbResult<()>
fn delete_database(self) -> BackendResult<()>
fn version(&self) -> Result<u64, E::Error>
fn set_version(&mut self, version: u64) -> DbResult<()>
Trait Implementations§
Source§impl<E> MallocSizeOf for IndexedDBEnvironment<E>where
E: MallocSizeOf + KvsEngine,
impl<E> MallocSizeOf for IndexedDBEnvironment<E>where
E: MallocSizeOf + KvsEngine,
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl<E> Freeze for IndexedDBEnvironment<E>where
E: Freeze,
impl<E> RefUnwindSafe for IndexedDBEnvironment<E>where
E: RefUnwindSafe,
impl<E> Send for IndexedDBEnvironment<E>where
E: Send,
impl<E> Sync for IndexedDBEnvironment<E>where
E: Sync,
impl<E> Unpin for IndexedDBEnvironment<E>where
E: Unpin,
impl<E> UnwindSafe for IndexedDBEnvironment<E>where
E: UnwindSafe,
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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert