pub struct StorageManager<C = ()> { /* private fields */ }Implementations§
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn write_schema_once( &self, mutation: &MutationId, key: SchemaKey, schema: impl Into<Arc<Schema>>, ) -> Result<StorageCursor>
pub async fn write_records_once( &self, mutation: &MutationId, records: Vec<RecordInput>, ) -> Result<StorageCursor>
pub async fn write_stream_once( &self, mutation: &MutationId, rows: Vec<StreamInput>, ) -> Result<StorageCursor>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn delete_file_once( &self, mutation: &MutationId, file: &StagedFile, ) -> Result<StagedFile>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn list_directory( &self, selection: DirectorySelection, ) -> Result<DirectoryReader>
pub async fn watch_directory( &self, selection: DirectorySelection, include_existing: bool, ) -> Result<DirectoryWatcher>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn capture_file(&self, request: CaptureFile) -> Result<FileReference>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn follow_file(&self, request: FollowFile) -> Result<FileFollower>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn follow_production( &self, file: &StagedFile, offset: u64, ) -> Result<ProductionFollower>
pub async fn file_progress(&self, file: &StagedFile) -> Result<FileProgress>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn read_file(&self, request: ReadFile) -> Result<FileReader>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn page<T: Entry>( &self, selection: &T::Selection, after: u64, limits: ReadLimits, ) -> Result<FollowPage<T>>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn lookup_schema( &self, key: &SchemaKey, ) -> Result<(StorageSchema, RetainedMemory)>
pub async fn admit_arrow_records( &self, scope: Option<&Identifier>, batch: &DecodedBatch, ) -> Result<StorageCursor>
pub async fn admit_arrow_streams( &self, scope: Option<&Identifier>, batch: &DecodedBatch, ) -> Result<StorageCursor>
pub async fn admit_arrow_objects( &self, _scope: Option<&Identifier>, batch: &DecodedBatch, ) -> Result<StorageCursor>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn start_with( &self, owner: Arc<()>, spawn: impl FnOnce(Worker) -> Result<Box<dyn WorkerOwner>>, ) -> Result<()>
pub fn settings(&self) -> &StorageSettings
pub async fn acquire(&self) -> Result<()>
pub fn same_instance<D>(&self, other: &StorageManager<D>) -> bool
pub fn claim_owner(&self, owner: Arc<()>) -> Result<()>
pub fn cursor_accepted(&self) -> StorageCursor
pub fn cursor_saved(&self) -> StorageCursor
pub fn status(&self) -> StorageMetrics
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn write_recovery( &self, payloads: Vec<Vec<u8>>, ) -> Result<RecoveryPosition>
pub async fn write_snapshot(&self, snapshot: RecoverySnapshot) -> Result<()>
pub async fn flush(&self) -> Result<StorageCursor>
pub async fn flush_until( &self, through: &StorageCursor, ) -> Result<StorageCursor>
pub async fn flush_prepared( &self, through: &StorageCursor, files: &Option<FileSave>, ) -> Result<StorageCursor>
pub async fn flush_recovery(&self) -> Result<RecoveryPosition>
pub async fn read_recovery( &self, after: &RecoveryPosition, through: &RecoveryPosition, limits: ReadLimits, ) -> Result<ReadBatch<RecoveryPage>>
pub async fn read_snapshot( &self, max_bytes: NonZeroUsize, ) -> Result<Option<ReadBatch<RecoverySnapshot>>>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
Sourcepub async fn wait_saved_after(
&self,
cursor: &StorageCursor,
) -> Result<StorageCursor>
pub async fn wait_saved_after( &self, cursor: &StorageCursor, ) -> Result<StorageCursor>
Waits passively for a strictly newer durable primary frontier.
Intermediate frontiers may coalesce. This does not request persistence or retry failed work. Cancellation only removes the notification waiter. A newer saved cursor is returned before checking terminal storage state.
pub fn check_state_dependency(&self, required: &StorageCursor) -> Result<()>
pub fn retry_transient_persistence(&self) -> bool
pub fn reserve_arrow_memory(&self, bytes: usize) -> Result<RetainedMemory>
pub fn write_receipt_capacity(&self) -> usize
pub async fn await_durable(&self, cursor: &StorageCursor) -> Result<()>
pub async fn release_object_history( &self, schema: &SchemaKey, item: &ObjectKey, through: &StorageCursor, ) -> Result<()>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn write_schema( &self, key: SchemaKey, schema: impl Into<Arc<Schema>>, ) -> Result<StorageCursor>
pub fn record_batch_len(&self, records: &[RecordInput]) -> Result<usize>
pub fn stream_batch_len(&self, rows: &[StreamInput]) -> Result<usize>
pub async fn write_records( &self, records: Vec<RecordInput>, ) -> Result<StorageCursor>
pub async fn write_stream( &self, rows: Vec<StreamInput>, ) -> Result<StorageCursor>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub fn erased(&self) -> StorageManager<ErasedCatalog>
Source§impl<C: ObjectCatalog> StorageManager<C>
impl<C: ObjectCatalog> StorageManager<C>
pub fn new(backends: StorageBackends, settings: StorageSettings) -> Result<Self>
pub fn with_execution( backends: StorageBackends, settings: StorageSettings, execution: Execution, ) -> Result<Self>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn write_objects_once( &self, mutation: &MutationId, objects: Vec<ObjectValue>, ) -> Result<Vec<ObjectReceipt>>
Source§impl<C: ObjectCatalog> StorageManager<C>
impl<C: ObjectCatalog> StorageManager<C>
pub async fn write_object<T: StoredObject>(
&self,
value: &T,
) -> Result<ObjectReceipt>where
C: Contains<T>,
pub async fn write_object_group( &self, max_bytes: NonZeroUsize, count: NonZeroUsize, build: impl FnOnce(&mut ObjectGroup<'_, C>) -> Result<()> + Send, ) -> Result<Vec<ObjectReceipt>>
pub async fn read_object<T: StoredObject>(
&self,
key: &T::Key,
version: ObjectVersion,
) -> Result<Option<ReadBatch<ObjectRevision<T>>>>where
C: Contains<T>,
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
Sourcepub fn object_receipts_memory(&self, count: NonZeroUsize) -> Result<usize>
pub fn object_receipts_memory(&self, count: NonZeroUsize) -> Result<usize>
Bounds the owned receipt Vec returned for an object group.
Uses the producer’s declared history, including both cloned histories in each receipt. Preclaim this plus caller-owned pending/response scaffolding before writing. Move the resulting cursor and claim into pending ownership before the next await; retries reuse that receipt instead of reissuing an ordinary group write. This method neither allocates nor admits memory.
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn query(&self, query: Query) -> Result<QueryReader>
Source§impl<C: ObjectCatalog> StorageManager<C>
impl<C: ObjectCatalog> StorageManager<C>
pub async fn read_objects<T: StoredObject>(
&self,
read: ObjectRead<'_, T>,
) -> Result<ObjectReader<T>>where
C: Contains<T>,
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn read_records<T: Message + MemorySize>( &self, read: RecordRead, ) -> Result<RecordReader<T>>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn read_memory(&self, bytes: NonZeroUsize) -> Result<RetainedMemory>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub fn read_session(&self) -> ReadSession<C>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub fn info(&self) -> Result<StorageInfo>
pub fn mutation_window(&self) -> Result<MutationWindow>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub fn capture_files( &self, through: Option<&StorageCursor>, ) -> Result<Option<FileSave>>
pub async fn persist_files(&self, save: &Option<FileSave>) -> Result<()>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn create_file(&self, metadata: FileMetadata) -> Result<StorageFile>
pub async fn write_file( &self, metadata: FileMetadata, bytes: Vec<u8>, ) -> Result<FileReference>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn append_file_once( &self, mutation: &MutationId, token: &FileSession, offset: u64, bytes: impl Into<FileChunk>, ) -> Result<FileProducer>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn create_file_once( &self, mutation: &MutationId, metadata: &FileMetadata, ) -> Result<FileProducer>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn finish_file_once( &self, mutation: &MutationId, token: &FileSession, ) -> Result<FileReference>
pub async fn abandon_file_once( &self, mutation: &MutationId, token: &FileSession, ) -> Result<FileProgress>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn resume_file_once( &self, mutation: &MutationId, token: &FileSession, ) -> Result<FileProducer>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn produce_file(&self, metadata: FileMetadata) -> Result<StorageFile>
pub async fn resume_file(&self, token: &FileSession) -> Result<StorageFile>
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn reserve_transition( &self, payload_bytes: usize, records: Option<ReadLimits>, ) -> Result<Permit>
pub async fn reserve_snapshot(&self, payload_bytes: usize) -> Result<Permit>
pub async fn settle_transition(&self)
Source§impl<C> StorageManager<C>
impl<C> StorageManager<C>
pub async fn recovery_reader( &self, limits: ReadLimits, snapshot_bytes: Option<NonZeroUsize>, ) -> Result<RecoveryReader<'_, C>>
Trait Implementations§
Auto Trait Implementations§
impl<C = ()> !RefUnwindSafe for StorageManager<C>
impl<C = ()> !UnwindSafe for StorageManager<C>
impl<C> Freeze for StorageManager<C>
impl<C> Send for StorageManager<C>
impl<C> Sync for StorageManager<C>
impl<C> Unpin for StorageManager<C>
impl<C> UnsafeUnpin for StorageManager<C>
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