Struct pagecache::Radix
[−]
[src]
pub struct Radix<T> where
T: 'static + Send + Sync, { /* fields omitted */ }
A simple lock-free radix tree.
Methods
impl<T> Radix<T> where
T: 'static + Send + Sync,
[src]
T: 'static + Send + Sync,
fn insert(&self, pid: PageID, item: T) -> Result<(), ()>
[src]
Try to create a new item in the tree.
fn swap<'g>(
&self,
pid: PageID,
new: Shared<'g, T>,
guard: &'g Guard
) -> Shared<'g, T>
[src]
&self,
pid: PageID,
new: Shared<'g, T>,
guard: &'g Guard
) -> Shared<'g, T>
Atomically swap the previous value in a tree with a new one.
fn cas<'g>(
&self,
pid: PageID,
old: Shared<'g, T>,
new: Shared<'g, T>,
guard: &'g Guard
) -> Result<Shared<'g, T>, Shared<'g, T>>
[src]
&self,
pid: PageID,
old: Shared<'g, T>,
new: Shared<'g, T>,
guard: &'g Guard
) -> Result<Shared<'g, T>, Shared<'g, T>>
Compare and swap an old value to a new one.
fn get<'g>(&self, pid: PageID, guard: &'g Guard) -> Option<Shared<'g, T>>
[src]
Try to get a value from the tree.
fn del<'g>(&self, pid: PageID, guard: &'g Guard) -> Option<Shared<'g, T>>
[src]
Delete a value from the tree, returning the old value if it was set.
Trait Implementations
impl<T> Default for Radix<T> where
T: 'static + Send + Sync,
[src]
T: 'static + Send + Sync,
impl<T> Drop for Radix<T> where
T: 'static + Send + Sync,
[src]
T: 'static + Send + Sync,