pub struct DisabledCacheManager;Expand description
A CacheManager that caches nothing.
Every CacheManager::get returns 0 (miss) and every
CacheManager::put returns false. Used as the implementation when the
cache is disabled, and as a safe fallback when initialization fails.
Trait Implementations§
Source§impl CacheManager for DisabledCacheManager
impl CacheManager for DisabledCacheManager
Source§fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
_page_id: &'life1 PageId,
_page: Bytes,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
_page_id: &'life1 PageId,
_page: Bytes,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Store (fill) a whole page. Read more
Source§fn schedule_fill(self: Arc<Self>, _page_id: PageId, _page: Bytes)
fn schedule_fill(self: Arc<Self>, _page_id: PageId, _page: Bytes)
Schedule a best-effort cache fill that does not block the caller. Read more
Source§fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_page_id: &'life1 PageId,
_page_offset: usize,
_dst: &'life2 mut [u8],
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_page_id: &'life1 PageId,
_page_offset: usize,
_dst: &'life2 mut [u8],
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
_page_id: &'life1 PageId,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
_page_id: &'life1 PageId,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a single page. Returns
true if a page was removed.Source§fn invalidate<'life0, 'life1, 'async_trait>(
&'life0 self,
_file_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn invalidate<'life0, 'life1, 'async_trait>(
&'life0 self,
_file_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Invalidate all cached pages belonging to
file_id. Read moreSource§fn state(&self) -> CacheState
fn state(&self) -> CacheState
Current operational state.
Source§fn get_bytes<'life0, 'life1, 'async_trait>(
&'life0 self,
page_id: &'life1 PageId,
page_offset: usize,
len: usize,
) -> Pin<Box<dyn Future<Output = Bytes> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_bytes<'life0, 'life1, 'async_trait>(
&'life0 self,
page_id: &'life1 PageId,
page_offset: usize,
len: usize,
) -> Pin<Box<dyn Future<Output = Bytes> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_batch_bytes<'life0, 'life1, 'async_trait>(
&'life0 self,
requests: &'life1 [PageReadRequest],
) -> Pin<Box<dyn Future<Output = Vec<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_batch_bytes<'life0, 'life1, 'async_trait>(
&'life0 self,
requests: &'life1 [PageReadRequest],
) -> Pin<Box<dyn Future<Output = Vec<Bytes>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read multiple cached pages. Each output corresponds to the request at
the same index; an empty
Bytes means miss or cache error.Source§fn on_file_open<'life0, 'life1, 'async_trait>(
&'life0 self,
_file_id: &'life1 str,
_length: i64,
_last_modification_time_ms: i64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_file_open<'life0, 'life1, 'async_trait>(
&'life0 self,
_file_id: &'life1 str,
_length: i64,
_last_modification_time_ms: i64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Notify the cache that a file was (re)opened with the given identity. Read more
Source§impl Clone for DisabledCacheManager
impl Clone for DisabledCacheManager
Source§fn clone(&self) -> DisabledCacheManager
fn clone(&self) -> DisabledCacheManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DisabledCacheManager
impl Debug for DisabledCacheManager
Source§impl Default for DisabledCacheManager
impl Default for DisabledCacheManager
Source§fn default() -> DisabledCacheManager
fn default() -> DisabledCacheManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DisabledCacheManager
impl RefUnwindSafe for DisabledCacheManager
impl Send for DisabledCacheManager
impl Sync for DisabledCacheManager
impl Unpin for DisabledCacheManager
impl UnsafeUnpin for DisabledCacheManager
impl UnwindSafe for DisabledCacheManager
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request