pub struct DigestedChunkMap { /* private fields */ }Expand description
An implementation of ChunkMap to support chunk state tracking by using
HashSet<RafsDigest>.
The DigestedChunkMap is an implementation of ChunkMap which uses a hash set
(HashSet<chunk_digest>) to record whether a chunk has already been cached by the blob cache.
The implementation is memory and computation heavy, so it is used only to keep backward
compatibility with the previous old nydus bootstrap format. For new clients, please use other
alternative implementations.
Implementations§
Trait Implementations§
Source§impl ChunkIndexGetter for DigestedChunkMap
impl ChunkIndexGetter for DigestedChunkMap
Source§type Index = RafsDigest
type Index = RafsDigest
Type of index needed by ChunkMap.
Source§fn get_index(chunk: &dyn BlobChunkInfo) -> Self::Index
fn get_index(chunk: &dyn BlobChunkInfo) -> Self::Index
Get the chunk’s id/key for state tracking.
Source§impl ChunkMap for DigestedChunkMap
impl ChunkMap for DigestedChunkMap
Source§fn is_ready(&self, chunk: &dyn BlobChunkInfo) -> Result<bool>
fn is_ready(&self, chunk: &dyn BlobChunkInfo) -> Result<bool>
Check whether the chunk is ready for use.
Source§fn set_ready_and_clear_pending(&self, chunk: &dyn BlobChunkInfo) -> Result<()>
fn set_ready_and_clear_pending(&self, chunk: &dyn BlobChunkInfo) -> Result<()>
Set the chunk to ready for use and clear the pending state.
Source§fn is_pending(&self, _chunk: &dyn BlobChunkInfo) -> Result<bool>
fn is_pending(&self, _chunk: &dyn BlobChunkInfo) -> Result<bool>
Check whether the chunk is pending for downloading.
Source§fn is_ready_or_pending(&self, chunk: &dyn BlobChunkInfo) -> Result<bool>
fn is_ready_or_pending(&self, chunk: &dyn BlobChunkInfo) -> Result<bool>
Check whether a chunk is ready for use or pending for downloading.
Source§fn check_ready_and_mark_pending(
&self,
_chunk: &dyn BlobChunkInfo,
) -> StorageResult<bool>
fn check_ready_and_mark_pending( &self, _chunk: &dyn BlobChunkInfo, ) -> StorageResult<bool>
Check whether the chunk is ready for use, and mark it as pending if not ready yet. Read more
Source§fn clear_pending(&self, _chunk: &dyn BlobChunkInfo)
fn clear_pending(&self, _chunk: &dyn BlobChunkInfo)
Clear the pending state of the chunk.
Source§fn is_persist(&self) -> bool
fn is_persist(&self) -> bool
Check whether the implementation supports state persistence.
Source§impl Default for DigestedChunkMap
impl Default for DigestedChunkMap
Source§fn default() -> DigestedChunkMap
fn default() -> DigestedChunkMap
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for DigestedChunkMap
impl RefUnwindSafe for DigestedChunkMap
impl Send for DigestedChunkMap
impl Sync for DigestedChunkMap
impl Unpin for DigestedChunkMap
impl UnsafeUnpin for DigestedChunkMap
impl UnwindSafe for DigestedChunkMap
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