pub struct RocksDbFutureQueue { /* private fields */ }Expand description
RocksDB future queue
Column Families - fqueue [due_time + hash(future_element_ref)] -> future_element_ref {8 byte prefix (due_time)} - findex [(position_in_query + group_signature) + hash(future_element_ref)] -> due_time {12 byte prefix (position_in_query(4) + group_signature(8))}
Implementations§
Source§impl RocksDbFutureQueue
impl RocksDbFutureQueue
Sourcepub fn new(
db: Arc<OptimisticTransactionDB>,
session_state: Arc<RocksDbSessionState>,
) -> Self
pub fn new( db: Arc<OptimisticTransactionDB>, session_state: Arc<RocksDbSessionState>, ) -> Self
Create a new RocksDbFutureQueue from a shared database handle.
The database must already have the required column families created.
Use open_unified_db() to open a database with all required CFs.
Trait Implementations§
Source§impl FutureQueue for RocksDbFutureQueue
impl FutureQueue for RocksDbFutureQueue
fn push<'life0, 'life1, 'async_trait>(
&'life0 self,
push_type: PushType,
position_in_query: usize,
group_signature: u64,
element_ref: &'life1 ElementReference,
original_time: ElementTimestamp,
due_time: ElementTimestamp,
) -> Pin<Box<dyn Future<Output = Result<bool, IndexError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove<'life0, 'async_trait>(
&'life0 self,
position_in_query: usize,
group_signature: u64,
) -> Pin<Box<dyn Future<Output = Result<(), IndexError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<FutureElementRef>, IndexError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn peek_due_time<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<ElementTimestamp>, IndexError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), IndexError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for RocksDbFutureQueue
impl RefUnwindSafe for RocksDbFutureQueue
impl Send for RocksDbFutureQueue
impl Sync for RocksDbFutureQueue
impl Unpin for RocksDbFutureQueue
impl UnsafeUnpin for RocksDbFutureQueue
impl UnwindSafe for RocksDbFutureQueue
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