pub struct ExpressDataCache<Client: ObjectClient> { /* private fields */ }Expand description
A data cache on S3 Express One Zone that can be shared across Mountpoint instances.
Implementations§
Source§impl<Client> ExpressDataCache<Client>
impl<Client> ExpressDataCache<Client>
Sourcepub fn new(client: Client, config: ExpressDataCacheConfig) -> Self
pub fn new(client: Client, config: ExpressDataCacheConfig) -> Self
Create a new instance.
pub async fn make_put_object_request<'a>( &self, params: PutObjectSingleParams, object_key: &str, data: impl AsRef<[u8]> + Send + 'a, ) -> Result<(), DataCacheError>
pub async fn verify_cache_valid(&self) -> Result<(), DataCacheError>
Trait Implementations§
Source§impl<Client> DataCache for ExpressDataCache<Client>
impl<Client> DataCache for ExpressDataCache<Client>
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<Client> Freeze for ExpressDataCache<Client>where
Client: Freeze,
impl<Client> RefUnwindSafe for ExpressDataCache<Client>where
Client: RefUnwindSafe,
impl<Client> Send for ExpressDataCache<Client>where
Client: Send,
impl<Client> Sync for ExpressDataCache<Client>where
Client: Sync,
impl<Client> Unpin for ExpressDataCache<Client>where
Client: Unpin,
impl<Client> UnwindSafe for ExpressDataCache<Client>where
Client: UnwindSafe,
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