| Apache Ignite C++

Public Member Functions | List of all members
ignite::cache::MutableCacheEntry< K, V > Class Template Reference

Mutable representation of CacheEntry class template. More...

`#include <mutable_cache_entry.h>`

## Public Member Functions
| MutableCacheEntry ()
| Default constructor.
| MutableCacheEntry (const K &key)
| Constructor for non-existing entry. More...
| MutableCacheEntry (const K &key, const V &val)
| Constructor for existing entry. More...
| MutableCacheEntry (const MutableCacheEntry &other)
| Copy constructor. More...
MutableCacheEntry & | operator= (const MutableCacheEntry &other)
| Assignment operator. More...
bool | IsExists () const
| Check whether cache entry exists in cache. More...
void | Remove ()
| Removes the entry from the Cache.
const K & | GetKey () const
| Get key. More...
const V & | GetValue () const
| Get value. More...
void | SetValue (const V &val)
| Sets or replaces the value associated with the key. More...

## Detailed Description

### template<typename K, typename V>
class ignite::cache::MutableCacheEntry< K, V >

Mutable representation of CacheEntry class template.

Both key and value types should be default-constructable, copy-constructable and assignable.

Additionally, equality operator should be defined for the value type.

## Constructor & Destructor Documentation

## ◆ MutableCacheEntry() [1/3]

template<typename K , typename V >

ignite::cache::MutableCacheEntry< K, V >::MutableCacheEntry | ( | const K & | key | ) |
| inline

Constructor for non-existing entry.

Parameters

  key | Key.

## ◆ MutableCacheEntry() [2/3]

template<typename K , typename V >

ignite::cache::MutableCacheEntry< K, V >::MutableCacheEntry | ( | const K & | key,
|  | const V & | val
| ) |  |
| inline

Constructor for existing entry.

Parameters

  key | Key.
  val | Value.

## ◆ MutableCacheEntry() [3/3]

template<typename K , typename V >

ignite::cache::MutableCacheEntry< K, V >::MutableCacheEntry | ( | const MutableCacheEntry< K, V > & | other | ) |
| inline

Copy constructor.

Parameters

  other | Other instance.

## Member Function Documentation

## ◆ GetKey()

template<typename K , typename V >

const K& ignite::cache::MutableCacheEntry< K, V >::GetKey | ( |  | ) | const
| inline

Get key.

Returns
  Key.

## ◆ GetValue()

template<typename K , typename V >

const V& ignite::cache::MutableCacheEntry< K, V >::GetValue | ( |  | ) | const
| inline

Get value.

Returns
  Value.

## ◆ IsExists()

template<typename K , typename V >

bool ignite::cache::MutableCacheEntry< K, V >::IsExists | ( |  | ) | const
| inline

Check whether cache entry exists in cache.

Returns
  True if the cache entry exists in cache and false otherwise.

## ◆ operator=()

template<typename K , typename V >

MutableCacheEntry& ignite::cache::MutableCacheEntry< K, V >::operator= | ( | const MutableCacheEntry< K, V > & | other | ) |
| inline

Assignment operator.

Parameters

  other | Other instance.

Returns
  *this.

## ◆ SetValue()

template<typename K , typename V >

void ignite::cache::MutableCacheEntry< K, V >::SetValue | ( | const V & | val | ) |
| inline

Sets or replaces the value associated with the key.

After setter invocation "IsExists" will return true.

Parameters

  val | Value to set.

The documentation for this class was generated from the following file:

- mutable_cache_entry.h