pub struct ColdIndexPageCache<S: ColdIndexPageStore + ?Sized> { /* private fields */ }Implementations§
Source§impl<S: ColdIndexPageStore + ?Sized> ColdIndexPageCache<S>
impl<S: ColdIndexPageStore + ?Sized> ColdIndexPageCache<S>
pub fn new(store: Arc<S>, capacity_pages: usize) -> Self
pub async fn put_page( &self, key: &ColdIndexPageKey, page: &ColdIndexPage, ) -> Result<()>
pub async fn get_page( &self, key: &ColdIndexPageKey, ) -> Result<Option<Arc<ColdIndexPage>>>
Sourcepub fn invalidate_stream(&self, stream_id: &BucketStreamId)
pub fn invalidate_stream(&self, stream_id: &BucketStreamId)
Drops every cached generation/page for one stream. Compaction invokes this on every replica when the replicated replacement command applies.
pub async fn object_segments_for_read( &self, stream_id: &BucketStreamId, segment: &StreamReadColdIndexSegment, ) -> Result<Vec<ObjectPayloadRef>>
pub fn cached_page_count(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl<S> !Freeze for ColdIndexPageCache<S>
impl<S> RefUnwindSafe for ColdIndexPageCache<S>
impl<S> Send for ColdIndexPageCache<S>
impl<S> Sync for ColdIndexPageCache<S>
impl<S> Unpin for ColdIndexPageCache<S>
impl<S> UnsafeUnpin for ColdIndexPageCache<S>
impl<S> UnwindSafe for ColdIndexPageCache<S>
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