pub struct StorageManager<C = ()> { /* private fields */ }Implementations§
Source§impl<C: ObjectCatalog> StorageManager<C>
impl<C: ObjectCatalog> StorageManager<C>
pub fn new(backends: StorageBackends, settings: StorageSettings) -> Result<Self>
Methods from Deref<Target = StorageManager<C>>§
pub async fn write_schema_once( &self, mutation: &MutationId, key: SchemaKey, schema: impl Into<Arc<Schema>>, ) -> Result<StorageCursor, Error>
pub async fn write_records_once( &self, mutation: &MutationId, records: Vec<RecordInput>, ) -> Result<StorageCursor, Error>
pub async fn write_stream_once( &self, mutation: &MutationId, rows: Vec<StreamInput>, ) -> Result<StorageCursor, Error>
pub async fn delete_file_once( &self, mutation: &MutationId, file: &StagedFile, ) -> Result<StagedFile, Error>
pub async fn list_directory( &self, selection: DirectorySelection, ) -> Result<DirectoryReader, Error>
pub async fn watch_directory( &self, selection: DirectorySelection, include_existing: bool, ) -> Result<DirectoryWatcher, Error>
pub async fn capture_file( &self, request: CaptureFile, ) -> Result<FileReference, Error>
pub async fn follow_file( &self, request: FollowFile, ) -> Result<FileFollower, Error>
pub async fn hash_file(&self, request: HashFile) -> Result<FileHash, Error>
pub async fn follow_production( &self, file: &StagedFile, offset: u64, ) -> Result<ProductionFollower, Error>
pub async fn file_progress( &self, file: &StagedFile, ) -> Result<FileProgress, Error>
pub async fn read_file(&self, request: ReadFile) -> Result<FileReader, Error>
pub async fn follow<T>(
&self,
after: Option<&StorageCursor>,
selection: <T as Entry>::Selection,
) -> Result<Follower<T>, Error>where
T: Entry,
pub async fn page<T>(
&self,
selection: &<T as Entry>::Selection,
after: u64,
limits: ReadLimits,
) -> Result<FollowPage<T>, Error>where
T: Entry,
pub async fn lookup_schema( &self, key: &SchemaKey, ) -> Result<(StorageSchema, RetainedMemory), Error>
pub async fn admit_arrow_records( &self, scope: Option<&Identifier>, batch: &DecodedBatch, ) -> Result<StorageCursor, Error>
pub async fn admit_arrow_streams( &self, scope: Option<&Identifier>, batch: &DecodedBatch, ) -> Result<StorageCursor, Error>
pub async fn admit_arrow_objects( &self, _scope: Option<&Identifier>, batch: &DecodedBatch, ) -> Result<StorageCursor, Error>
pub async fn start_with( &self, owner: Arc<()>, spawn: impl FnOnce(Worker) -> Result<Box<dyn WorkerOwner>, Error>, ) -> Result<(), Error>
pub fn settings(&self) -> &StorageSettings
pub async fn acquire(&self) -> Result<(), Error>
pub fn same_instance<D>(&self, other: &StorageManager<D>) -> bool
pub fn claim_owner(&self, owner: Arc<()>) -> Result<(), Error>
pub fn cursor_accepted(&self) -> StorageCursor
pub fn cursor_saved(&self) -> StorageCursor
pub fn status(&self) -> StorageMetrics
pub async fn write_recovery( &self, payloads: Vec<Vec<u8>>, ) -> Result<RecoveryPosition, Error>
pub async fn write_snapshot( &self, snapshot: RecoverySnapshot, ) -> Result<(), Error>
pub async fn flush(&self) -> Result<StorageCursor, Error>
pub async fn flush_until( &self, through: &StorageCursor, ) -> Result<StorageCursor, Error>
pub async fn flush_prepared( &self, through: &StorageCursor, files: &Option<FileSave>, ) -> Result<StorageCursor, Error>
pub async fn flush_recovery(&self) -> Result<RecoveryPosition, Error>
pub async fn read_recovery( &self, after: &RecoveryPosition, through: &RecoveryPosition, limits: ReadLimits, ) -> Result<ReadBatch<RecoveryPage>, Error>
pub async fn read_snapshot( &self, max_bytes: NonZero<usize>, ) -> Result<Option<ReadBatch<RecoverySnapshot>>, Error>
pub async fn close(&self) -> Result<(), Error>
Sourcepub async fn wait_saved_after(
&self,
cursor: &StorageCursor,
) -> Result<StorageCursor, Error>
pub async fn wait_saved_after( &self, cursor: &StorageCursor, ) -> Result<StorageCursor, Error>
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<(), Error>
pub fn retry_transient_persistence(&self) -> bool
pub fn reserve_arrow_memory( &self, bytes: usize, ) -> Result<RetainedMemory, Error>
pub fn write_receipt_capacity(&self) -> usize
pub async fn await_durable(&self, cursor: &StorageCursor) -> Result<(), Error>
pub async fn release_object_history( &self, schema: &SchemaKey, item: &ObjectKey, through: &StorageCursor, ) -> Result<(), Error>
pub async fn write_schema( &self, key: SchemaKey, schema: impl Into<Arc<Schema>>, ) -> Result<StorageCursor, Error>
pub fn record_batch_len(&self, records: &[RecordInput]) -> Result<usize, Error>
pub fn stream_batch_len(&self, rows: &[StreamInput]) -> Result<usize, Error>
pub async fn write_records( &self, records: Vec<RecordInput>, ) -> Result<StorageCursor, Error>
pub async fn write_stream( &self, rows: Vec<StreamInput>, ) -> Result<StorageCursor, Error>
pub fn erased(&self) -> StorageManager<ErasedCatalog>
pub async fn write_objects_once( &self, mutation: &MutationId, objects: Vec<ObjectValue>, ) -> Result<Vec<ObjectReceipt>, Error>
pub async fn write_object<T>(&self, value: &T) -> Result<ObjectReceipt, Error>where
T: StoredObject,
C: Contains<T>,
pub async fn write_object_group( &self, max_bytes: NonZero<usize>, count: NonZero<usize>, build: impl FnOnce(&mut ObjectGroup<'_, C>) -> Result<(), Error> + Send, ) -> Result<Vec<ObjectReceipt>, Error>
pub async fn read_object<T>(
&self,
key: &<T as StoredObject>::Key,
version: ObjectVersion,
) -> Result<Option<ReadBatch<ObjectRevision<T>>>, Error>where
T: StoredObject,
C: Contains<T>,
Sourcepub fn object_receipts_memory(
&self,
count: NonZero<usize>,
) -> Result<usize, Error>
pub fn object_receipts_memory( &self, count: NonZero<usize>, ) -> Result<usize, Error>
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.
pub async fn query(&self, query: Query) -> Result<QueryReader, Error>
pub async fn read_objects<T>(
&self,
read: ObjectRead<'_, T>,
) -> Result<ObjectReader<T>, Error>where
T: StoredObject,
C: Contains<T>,
pub async fn read_records<T>(
&self,
read: RecordRead,
) -> Result<RecordReader<T>, Error>where
T: Message + MemorySize,
pub async fn read_memory( &self, bytes: NonZero<usize>, ) -> Result<RetainedMemory, Error>
pub fn read_session(&self) -> ReadSession<C>
pub fn info(&self) -> Result<StorageInfo, Error>
pub fn mutation_window(&self) -> Result<MutationWindow, Error>
pub fn capture_files( &self, through: Option<&StorageCursor>, ) -> Result<Option<FileSave>, Error>
pub async fn persist_files(&self, save: &Option<FileSave>) -> Result<(), Error>
pub async fn create_file( &self, metadata: FileMetadata, ) -> Result<StorageFile, Error>
pub async fn write_file( &self, metadata: FileMetadata, bytes: Vec<u8>, ) -> Result<FileReference, Error>
pub async fn append_file_once( &self, mutation: &MutationId, token: &FileSession, offset: u64, bytes: impl Into<StorageBatch<u8>>, ) -> Result<FileProducer, Error>
pub async fn create_file_once( &self, mutation: &MutationId, metadata: &FileMetadata, ) -> Result<FileProducer, Error>
pub async fn finish_file_once( &self, mutation: &MutationId, token: &FileSession, ) -> Result<FileReference, Error>
pub async fn abandon_file_once( &self, mutation: &MutationId, token: &FileSession, ) -> Result<FileProgress, Error>
pub async fn resume_file_once( &self, mutation: &MutationId, token: &FileSession, ) -> Result<FileProducer, Error>
pub async fn produce_file( &self, metadata: FileMetadata, ) -> Result<StorageFile, Error>
pub async fn resume_file( &self, token: &FileSession, ) -> Result<StorageFile, Error>
pub async fn reserve_transition( &self, payload_bytes: usize, records: Option<ReadLimits>, ) -> Result<Permit, Error>
pub async fn reserve_snapshot( &self, payload_bytes: usize, ) -> Result<Permit, Error>
pub async fn settle_transition(&self)
pub async fn recovery_reader( &self, limits: ReadLimits, snapshot_bytes: Option<NonZero<usize>>, ) -> Result<RecoveryReader<'_, C>, Error>
Trait Implementations§
Source§impl<C> Clone for StorageManager<C>
impl<C> Clone for StorageManager<C>
Auto Trait Implementations§
impl<C = ()> !RefUnwindSafe for StorageManager<C>
impl<C = ()> !UnwindSafe for StorageManager<C>
impl<C> Freeze for StorageManager<C>where
StorageManager<C>: Freeze,
impl<C> Send for StorageManager<C>where
StorageManager<C>: Send,
impl<C> Sync for StorageManager<C>where
StorageManager<C>: Sync,
impl<C> Unpin for StorageManager<C>where
StorageManager<C>: Unpin,
impl<C> UnsafeUnpin for StorageManager<C>where
StorageManager<C>: UnsafeUnpin,
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