pub struct StoreDeletionLock { /* private fields */ }Expand description
Exclusive access to the writer, readers and bootstrap, authorizing
deletion. Holding the bootstrap lock keeps every restore, join and
replacement of the store out, including a reset_device or
restore_device that holds only that lock between the steps of an
unfinished swap (§19.3), and lets deletion remove its lock file too.
Implementations§
Source§impl StoreDeletionLock
impl StoreDeletionLock
Sourcepub fn unpublish(&mut self) -> Result<(), FileError>
pub fn unpublish(&mut self) -> Result<(), FileError>
Rename the store’s directory to its deletion name, durably: the store leaves every listing and open, and the directory under that name, or the store’s lock files without a directory, record that its deletion is under way, for the next listing, restore or join of the store to finish (§11.6, E1). Done already, it changes nothing.
Sourcepub fn remove_directory(self) -> Result<(), FileError>
pub fn remove_directory(self) -> Result<(), FileError>
Unpublish the directory, as unpublish does, and remove its contents
before releasing and removing its sibling locks. Retry failures
through lock_for_deletion, including a failure after only the lock
files remain.