pub struct DiskDataCache { /* private fields */ }Expand description
On-disk implementation of DataCache.
Implementations§
Source§impl DiskDataCache
impl DiskDataCache
Sourcepub fn new(config: DiskDataCacheConfig, pool: PagedPool) -> Self
pub fn new(config: DiskDataCacheConfig, pool: PagedPool) -> Self
Create a new instance of an DiskDataCache with the specified configuration.
Trait Implementations§
Source§impl DataCache for DiskDataCache
impl DataCache for DiskDataCache
Source§fn get_block<'life0, 'life1, 'async_trait>(
&'life0 self,
cache_key: &'life1 ObjectId,
block_idx: BlockIndex,
block_offset: u64,
_object_size: usize,
) -> Pin<Box<dyn Future<Output = DataCacheResult<Option<ChecksummedBytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_block<'life0, 'life1, 'async_trait>(
&'life0 self,
cache_key: &'life1 ObjectId,
block_idx: BlockIndex,
block_offset: u64,
_object_size: usize,
) -> Pin<Box<dyn Future<Output = DataCacheResult<Option<ChecksummedBytes>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn put_block<'life0, 'async_trait>(
&'life0 self,
cache_key: ObjectId,
block_idx: BlockIndex,
block_offset: u64,
bytes: ChecksummedBytes,
_object_size: usize,
) -> Pin<Box<dyn Future<Output = DataCacheResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put_block<'life0, 'async_trait>(
&'life0 self,
cache_key: ObjectId,
block_idx: BlockIndex,
block_offset: u64,
bytes: ChecksummedBytes,
_object_size: usize,
) -> Pin<Box<dyn Future<Output = DataCacheResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Put block of data to the cache for the given ObjectId and BlockIndex.
Source§fn block_size(&self) -> u64
fn block_size(&self) -> u64
Returns the block size for the data cache.
Auto Trait Implementations§
impl !Freeze for DiskDataCache
impl RefUnwindSafe for DiskDataCache
impl Send for DiskDataCache
impl Sync for DiskDataCache
impl Unpin for DiskDataCache
impl UnwindSafe for DiskDataCache
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