Struct ora_store_memory::MemoryStore
source · pub struct MemoryStore { /* private fields */ }Expand description
An in-memory store for Ora.
Implementations§
source§impl MemoryStore
impl MemoryStore
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new MemoryStore.
sourcepub fn new_with_options(options: MemoryStoreOptions) -> Self
pub fn new_with_options(options: MemoryStoreOptions) -> Self
Creates a new MemoryStore with the given options.
Trait Implementations§
source§impl ClientOperations for MemoryStore
impl ClientOperations for MemoryStore
fn add_task<'life0, 'async_trait>( &'life0 self, task: TaskDefinition ) -> Pin<Box<dyn Future<Output = Result<Uuid>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn task<'life0, 'async_trait>( &'life0 self, task_id: Uuid ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn TaskOperations>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn tasks<'life0, 'life1, 'async_trait>( &'life0 self, options: &'life1 Tasks ) -> Pin<Box<dyn Future<Output = Result<Vec<Arc<dyn TaskOperations>>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn task_count<'life0, 'life1, 'async_trait>( &'life0 self, options: &'life1 Tasks ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn task_labels<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn task_kinds<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn add_schedule<'life0, 'async_trait>( &'life0 self, schedule: ScheduleDefinition ) -> Pin<Box<dyn Future<Output = Result<Uuid>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn schedule<'life0, 'async_trait>( &'life0 self, schedule_id: Uuid ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn ScheduleOperations>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn schedules<'life0, 'life1, 'async_trait>( &'life0 self, options: &'life1 Schedules ) -> Pin<Box<dyn Future<Output = Result<Vec<Arc<dyn ScheduleOperations>>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn schedule_count<'life0, 'life1, 'async_trait>( &'life0 self, options: &'life1 Schedules ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
fn schedule_labels<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
fn add_tasks<'life0, 'life1, 'async_trait>( &'life0 self, tasks: &'life1 mut (dyn ExactSizeIterator<Item = TaskDefinition<()>> + Send) ) -> Pin<Box<dyn Future<Output = Result<Vec<Uuid, Global>, Report>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,
fn cancel_tasks<'life0, 'life1, 'async_trait>( &'life0 self, options: &'life1 Tasks ) -> Pin<Box<dyn Future<Output = Result<Vec<Uuid, Global>, Report>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,
fn tasks_by_ids<'life0, 'async_trait>( &'life0 self, task_ids: Vec<Uuid, Global> ) -> Pin<Box<dyn Future<Output = Result<Vec<Arc<dyn TaskOperations, Global>, Global>, Report>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,
fn add_schedules<'life0, 'life1, 'async_trait>( &'life0 self, schedules: &'life1 mut (dyn ExactSizeIterator<Item = ScheduleDefinition> + Send) ) -> Pin<Box<dyn Future<Output = Result<Vec<Uuid, Global>, Report>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,
fn schedules_by_ids<'life0, 'async_trait>( &'life0 self, schedule_ids: Vec<Uuid, Global> ) -> Pin<Box<dyn Future<Output = Result<Vec<Arc<dyn ScheduleOperations, Global>, Global>, Report>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Self: 'async_trait,
fn cancel_schedules<'life0, 'life1, 'async_trait>( &'life0 self, options: &'life1 Schedules ) -> Pin<Box<dyn Future<Output = Result<Vec<Uuid, Global>, Report>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,
source§impl Clone for MemoryStore
impl Clone for MemoryStore
source§fn clone(&self) -> MemoryStore
fn clone(&self) -> MemoryStore
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for MemoryStore
impl Debug for MemoryStore
source§impl Default for MemoryStore
impl Default for MemoryStore
source§impl SchedulerScheduleStore for MemoryStore
impl SchedulerScheduleStore for MemoryStore
§type Events = Pin<Box<dyn Stream<Item = Result<SchedulerScheduleStoreEvent, <MemoryStore as SchedulerScheduleStore>::Error>> + Send, Global>>
type Events = Pin<Box<dyn Stream<Item = Result<SchedulerScheduleStoreEvent, <MemoryStore as SchedulerScheduleStore>::Error>> + Send, Global>>
An event stream that can be used to watch for changes.
source§fn events<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Self::Events, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn events<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Self::Events, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Subscribe for new events.
source§fn pending_schedules<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<ActiveSchedule>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_schedules<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<ActiveSchedule>, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Return all schedules that have no associated active tasks.
source§fn pending_schedule_of_task<'life0, 'async_trait>(
&'life0 self,
task_id: Uuid
) -> Pin<Box<dyn Future<Output = Result<Option<ActiveSchedule>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_schedule_of_task<'life0, 'async_trait>( &'life0 self, task_id: Uuid ) -> Pin<Box<dyn Future<Output = Result<Option<ActiveSchedule>, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Return the schedule of a task only if the schedule
has no associated active tasks.
source§impl SchedulerTaskStore for MemoryStore
impl SchedulerTaskStore for MemoryStore
§type Events = Pin<Box<dyn Stream<Item = Result<SchedulerTaskStoreEvent, <MemoryStore as SchedulerTaskStore>::Error>> + Send, Global>>
type Events = Pin<Box<dyn Stream<Item = Result<SchedulerTaskStoreEvent, <MemoryStore as SchedulerTaskStore>::Error>> + Send, Global>>
An event stream that can be used to watch for changes.
source§fn events<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Self::Events, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn events<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Self::Events, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Subscribe for new events.
source§fn pending_tasks<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<PendingTask>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pending_tasks<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<PendingTask>, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Return all tasks that should be scheduled.
source§fn active_tasks<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<ActiveTask>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn active_tasks<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<ActiveTask>, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Return active tasks that are not pending and are not
yet finished. Read more
source§impl WorkerStore for MemoryStore
impl WorkerStore for MemoryStore
§type Events = Pin<Box<dyn Stream<Item = Result<WorkerStoreEvent, <MemoryStore as WorkerStore>::Error>> + Send, Global>>
type Events = Pin<Box<dyn Stream<Item = Result<WorkerStoreEvent, <MemoryStore as WorkerStore>::Error>> + Send, Global>>
An event stream that can be used to watch for changes.
source§fn events<'life0, 'life1, 'async_trait>(
&'life0 self,
selectors: &'life1 [WorkerSelector]
) -> Pin<Box<dyn Future<Output = Result<Self::Events, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn events<'life0, 'life1, 'async_trait>( &'life0 self, selectors: &'life1 [WorkerSelector] ) -> Pin<Box<dyn Future<Output = Result<Self::Events, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Subscribe for new events with the given worker selectors.
source§fn ready_tasks<'life0, 'life1, 'async_trait>(
&'life0 self,
selectors: &'life1 [WorkerSelector]
) -> Pin<Box<dyn Future<Output = Result<Vec<ReadyTask>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn ready_tasks<'life0, 'life1, 'async_trait>( &'life0 self, selectors: &'life1 [WorkerSelector] ) -> Pin<Box<dyn Future<Output = Result<Vec<ReadyTask>, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Return all tasks that should be executed with any of the given worker selectors.
source§fn select_task<'life0, 'async_trait>(
&'life0 self,
task_id: Uuid,
worker_id: Uuid
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn select_task<'life0, 'async_trait>( &'life0 self, task_id: Uuid, worker_id: Uuid ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Select a task to run, if this function returns
false, the
worker should drop the task instead of running it. Read moresource§fn task_started<'life0, 'async_trait>(
&'life0 self,
task_id: Uuid
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn task_started<'life0, 'async_trait>( &'life0 self, task_id: Uuid ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Update the task status as started.
source§fn task_succeeded<'life0, 'async_trait>(
&'life0 self,
task_id: Uuid,
output: Vec<u8>,
output_format: TaskDataFormat
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn task_succeeded<'life0, 'async_trait>( &'life0 self, task_id: Uuid, output: Vec<u8>, output_format: TaskDataFormat ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Update the task status as successful with the given output.
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryStore
impl Send for MemoryStore
impl Sync for MemoryStore
impl Unpin for MemoryStore
impl !UnwindSafe for MemoryStore
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