pub struct Cache<K: WritableType + ReadableType, V: WritableType + ReadableType> {
pub _name: String,
/* private fields */
}
Expand description
Ignite key-value cache. This cache is strongly typed and reading/writing some other types leads to errors. All caches created from the single IgniteClient shares the common TCP connection
Fields§
§_name: String
Implementations§
Source§impl<K: WritableType + ReadableType, V: WritableType + ReadableType> Cache<K, V>
impl<K: WritableType + ReadableType, V: WritableType + ReadableType> Cache<K, V>
pub fn get(&self, key: &K) -> IgniteResult<Option<V>>
pub fn get_all(&self, keys: &[K]) -> IgniteResult<Vec<(Option<K>, Option<V>)>>
pub fn put(&self, key: &K, value: &V) -> IgniteResult<()>
pub fn put_all(&self, pairs: &[(K, V)]) -> IgniteResult<()>
pub fn contains_key(&self, key: &K) -> IgniteResult<bool>
pub fn contains_keys(&self, keys: &[K]) -> IgniteResult<bool>
pub fn get_and_put(&self, key: &K, value: &V) -> IgniteResult<Option<V>>
pub fn get_and_replace(&self, key: &K, value: &V) -> IgniteResult<Option<V>>
pub fn get_and_remove(&self, key: &K) -> IgniteResult<Option<V>>
pub fn put_if_absent(&self, key: &K, value: &V) -> IgniteResult<bool>
pub fn get_and_put_if_absent( &self, key: &K, value: &V, ) -> IgniteResult<Option<V>>
pub fn replace(&self, key: &K, value: &V) -> IgniteResult<bool>
pub fn replace_if_equals(&self, key: &K, old: &V, new: &V) -> IgniteResult<bool>
pub fn clear(&self) -> IgniteResult<()>
pub fn clear_key(&self, key: &K) -> IgniteResult<()>
pub fn clear_keys(&self, keys: &[K]) -> IgniteResult<()>
pub fn remove_key(&self, key: &K) -> IgniteResult<bool>
pub fn remove_if_equals(&self, key: &K, value: &V) -> IgniteResult<bool>
pub fn get_size(&self) -> IgniteResult<i64>
pub fn get_size_peek_mode(&self, mode: CachePeekMode) -> IgniteResult<i64>
pub fn get_size_peek_modes( &self, modes: Vec<CachePeekMode>, ) -> IgniteResult<i64>
pub fn remove_keys(&self, keys: &[K]) -> IgniteResult<()>
pub fn remove_all(&self) -> IgniteResult<()>
Auto Trait Implementations§
impl<K, V> Freeze for Cache<K, V>
impl<K, V> RefUnwindSafe for Cache<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> Send for Cache<K, V>
impl<K, V> Sync for Cache<K, V>
impl<K, V> Unpin for Cache<K, V>
impl<K, V> UnwindSafe for Cache<K, V>where
K: UnwindSafe,
V: UnwindSafe,
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