Apache Ignite C++
Public Member Functions | Protected Attributes | List of all members
ignite::cache::CacheEntry< K, V > Class Template Reference

Cache entry class template. More...

#include <cache_entry.h>

Inheritance diagram for ignite::cache::CacheEntry< K, V >:
ignite::cache::CacheEntryEvent< K, V >

Public Member Functions

 CacheEntry ()
 Default constructor. More...
 
 CacheEntry (const K &key, const V &val)
 Constructor. More...
 
 CacheEntry (const CacheEntry &other)
 Copy constructor. More...
 
 CacheEntry (const std::pair< K, V > &p)
 Constructor. More...
 
virtual ~CacheEntry ()
 Destructor.
 
CacheEntry & operator= (const CacheEntry &other)
 Assignment operator. More...
 
const K & GetKey () const
 Get key. More...
 
const V & GetValue () const
 Get value. More...
 
bool HasValue () const
 Check if the value exists. More...
 

Protected Attributes

K key
 Key. More...
 
V val
 Value. More...
 
bool hasValue
 Indicates whether value exists.
 

Detailed Description

template<typename K, typename V>
class ignite::cache::CacheEntry< K, V >

Cache entry class template.

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

Constructor & Destructor Documentation

◆ CacheEntry() [1/4]

template<typename K, typename V>
ignite::cache::CacheEntry< K, V >::CacheEntry ( )
inline

Default constructor.

Creates instance with both key and value default-constructed.

◆ CacheEntry() [2/4]

template<typename K, typename V>
ignite::cache::CacheEntry< K, V >::CacheEntry ( const K &  key,
const V &  val 
)
inline

Constructor.

Parameters
keyKey.
valValue.

◆ CacheEntry() [3/4]

template<typename K, typename V>
ignite::cache::CacheEntry< K, V >::CacheEntry ( const CacheEntry< K, V > &  other)
inline

Copy constructor.

Parameters
otherOther instance.

◆ CacheEntry() [4/4]

template<typename K, typename V>
ignite::cache::CacheEntry< K, V >::CacheEntry ( const std::pair< K, V > &  p)
inline

Constructor.

Parameters
pPair.

Member Function Documentation

◆ GetKey()

template<typename K, typename V>
const K& ignite::cache::CacheEntry< K, V >::GetKey ( ) const
inline

Get key.

Returns
Key.

◆ GetValue()

template<typename K, typename V>
const V& ignite::cache::CacheEntry< K, V >::GetValue ( ) const
inline

Get value.

Returns
Value.

◆ HasValue()

template<typename K, typename V>
bool ignite::cache::CacheEntry< K, V >::HasValue ( ) const
inline

Check if the value exists.

Returns
True, if the value exists.

◆ operator=()

template<typename K, typename V>
CacheEntry& ignite::cache::CacheEntry< K, V >::operator= ( const CacheEntry< K, V > &  other)
inline

Assignment operator.

Parameters
otherOther instance.

Member Data Documentation

◆ key

template<typename K, typename V>
K ignite::cache::CacheEntry< K, V >::key
protected

Key.

◆ val

template<typename K, typename V>
V ignite::cache::CacheEntry< K, V >::val
protected

Value.


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