pub struct BlobRangeMap { /* private fields */ }Expand description
An implementation of RangeMap to support cache state tracking by using a bitmap file.
The BlobRangeMap is an implementation of RangeMap which uses a bitmap file and atomic
bitmap operations to track readiness state. It creates or opens a file with the name
$blob_id.range_map to record whether a data range has been cached by the blob cache, and
atomic bitmap operations are used to manipulate the state bit. The bitmap file will be persisted
to disk.
Implementations§
Trait Implementations§
Source§impl RangeMap for BlobRangeMap
impl RangeMap for BlobRangeMap
Source§fn is_range_ready(&self, start: u64, count: u64) -> Result<bool>
fn is_range_ready(&self, start: u64, count: u64) -> Result<bool>
Check whether all data in the range are ready for use.
type I = u64
Source§fn is_range_all_ready(&self) -> bool
fn is_range_all_ready(&self) -> bool
Check whether all chunks or data managed by the
RangeMap object are ready.Source§fn check_range_ready_and_mark_pending(
&self,
start: u64,
count: u64,
) -> Result<Option<Vec<u64>>>
fn check_range_ready_and_mark_pending( &self, start: u64, count: u64, ) -> Result<Option<Vec<u64>>>
Check whether all chunks or data in the range [start, start + count) are ready. Read more
Source§fn set_range_ready_and_clear_pending(
&self,
start: u64,
count: u64,
) -> Result<()>
fn set_range_ready_and_clear_pending( &self, start: u64, count: u64, ) -> Result<()>
Mark all chunks or data in the range as ready for use.
Source§fn clear_range_pending(&self, _start: Self::I, _count: Self::I)
fn clear_range_pending(&self, _start: Self::I, _count: Self::I)
Clear the pending state for all chunks or data in the range.
Auto Trait Implementations§
impl !Freeze for BlobRangeMap
impl RefUnwindSafe for BlobRangeMap
impl Send for BlobRangeMap
impl Sync for BlobRangeMap
impl Unpin for BlobRangeMap
impl UnsafeUnpin for BlobRangeMap
impl UnwindSafe for BlobRangeMap
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