pub struct OplockTable {
held: Mutex<HashMap<String, OplockHolder>>,
}Expand description
Server-wide oplock table: at most one exclusive oplock per file path.
Fields§
§held: Mutex<HashMap<String, OplockHolder>>Implementations§
Source§impl OplockTable
impl OplockTable
Sourcepub fn grant(&self, path: &str, holder: OplockHolder) -> bool
pub fn grant(&self, path: &str, holder: OplockHolder) -> bool
Grant an exclusive oplock on path if none is held.
Sourcepub fn take(&self, path: &str) -> Option<OplockHolder>
pub fn take(&self, path: &str) -> Option<OplockHolder>
Remove and return the current holder of path, if any.
Sourcepub fn release(&self, path: &str, owner: LockOwner) -> Option<OplockHolder>
pub fn release(&self, path: &str, owner: LockOwner) -> Option<OplockHolder>
Drop the oplock held by owner on path (on close), returning it.
Sourcepub fn release_session(&self, session_id: u64)
pub fn release_session(&self, session_id: u64)
Drop every oplock held by any open of session_id.
Trait Implementations§
Source§impl Default for OplockTable
impl Default for OplockTable
Source§fn default() -> OplockTable
fn default() -> OplockTable
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for OplockTable
impl RefUnwindSafe for OplockTable
impl Send for OplockTable
impl Sync for OplockTable
impl Unpin for OplockTable
impl UnsafeUnpin for OplockTable
impl UnwindSafe for OplockTable
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