#include <gridclientdata.hpp>
Public Member Functions | |
| virtual | ~GridClientData () |
| virtual std::string | cacheName () const =0 |
| virtual TGridClientDataPtr | pinNodes (const TGridClientNodeList &nodes)=0 |
| virtual bool | put (const GridClientVariant &key, const GridClientVariant &val)=0 |
| virtual TGridBoolFuturePtr | putAsync (const GridClientVariant &key, const GridClientVariant &val)=0 |
| virtual bool | putAll (const TGridClientVariantMap &entries)=0 |
| virtual TGridBoolFuturePtr | putAllAsync (const TGridClientVariantMap &entries)=0 |
| virtual GridClientVariant | get (const GridClientVariant &key)=0 |
| virtual TGridClientFutureVariant | getAsync (const GridClientVariant &key)=0 |
| virtual TGridClientVariantMap | getAll (const TGridClientVariantSet &keys)=0 |
| virtual TGridClientFutureVariantMap | getAllAsync (const TGridClientVariantSet &keys)=0 |
| virtual bool | remove (const GridClientVariant &key)=0 |
| virtual TGridBoolFuturePtr | removeAsync (const GridClientVariant &key)=0 |
| virtual bool | removeAll (const TGridClientVariantSet &keys)=0 |
| virtual TGridBoolFuturePtr | removeAllAsync (const TGridClientVariantSet &keys)=0 |
| virtual bool | replace (const GridClientVariant &key, const GridClientVariant &val)=0 |
| virtual TGridBoolFuturePtr | replaceAsync (const GridClientVariant &key, const GridClientVariant &val)=0 |
| virtual bool | cas (const GridClientVariant &key, const GridClientVariant &val1, const GridClientVariant &val2)=0 |
| virtual TGridBoolFuturePtr | casAsync (const GridClientVariant &key, const GridClientVariant &val1, const GridClientVariant &val2)=0 |
| virtual GridClientUuid | affinity (const GridClientVariant &key)=0 |
| virtual GridClientDataMetrics | metrics ()=0 |
| virtual TGridClientFutureDataMetrics | metricsAsync ()=0 |
| virtual std::set < GridClientCacheFlag > | flags ()=0 |
| virtual TGridClientDataPtr | flagsOn (const std::set< GridClientCacheFlag > &flags)=0 |
| virtual TGridClientDataPtr | flagsOff (const std::set< GridClientCacheFlag > &flags)=0 |
A data projection of grid client. Contains various methods for cache operations and metrics retrieval.
| virtual GridClientData::~GridClientData | ( | ) | [inline, virtual] |
Destructor.
| virtual GridClientUuid GridClientData::affinity | ( | const GridClientVariant & | key | ) | [pure virtual] |
Gets affinity node ID for the given key. This method will return null if no affinity was configured for the given cache or there are no nodes in topology with cache enabled.
| key | Key. |
| GridClientException | In case of error. |
Implemented in GridClientDataProjectionImpl.
| virtual std::string GridClientData::cacheName | ( | ) | const [pure virtual] |
Gets name of the remote cache.
Implemented in GridClientDataProjectionImpl.
| virtual bool GridClientData::cas | ( | const GridClientVariant & | key, | |
| const GridClientVariant & | val1, | |||
| const GridClientVariant & | val2 | |||
| ) | [pure virtual] |
Sets entry value to val1 if current value is val2.
If val1 is null and val2 is equal to current value, entry is removed from cache.
If val2 is null, entry is created if it doesn't exist.
If both val1 and val2 are null, entry is removed.
| key | Key. | |
| val1 | Value to set. | |
| val2 | Check value. |
| GridClientException | In case of error. | |
| GridClientClosedException | If client was closed manually. | |
| GridServerUnreachableException | If none of the servers can be reached. |
Implemented in GridClientDataProjectionImpl.
| virtual TGridBoolFuturePtr GridClientData::casAsync | ( | const GridClientVariant & | key, | |
| const GridClientVariant & | val1, | |||
| const GridClientVariant & | val2 | |||
| ) | [pure virtual] |
Asynchronously sets entry value to val1 if current value is val2.
If val1 is null and val2 is equal to current value, entry is removed from cache.
If val2 is null, entry is created if it doesn't exist.
If both val1 and val2 are null, entry is removed.
| key | Key. | |
| val1 | Value to set. | |
| val2 | Check value. |
Implemented in GridClientDataProjectionImpl.
| virtual std::set<GridClientCacheFlag> GridClientData::flags | ( | ) | [pure virtual] |
Gets cache flags enabled on this data projection.
Implemented in GridClientDataProjectionImpl.
| virtual TGridClientDataPtr GridClientData::flagsOff | ( | const std::set< GridClientCacheFlag > & | flags | ) | [pure virtual] |
Creates new client data object with disabled cache flags.
| flags | Cache flags to be disabled. |
| GridClientException | In case of error. |
Implemented in GridClientDataProjectionImpl.
| virtual TGridClientDataPtr GridClientData::flagsOn | ( | const std::set< GridClientCacheFlag > & | flags | ) | [pure virtual] |
Creates new client data object with enabled cache flags.
| flags | Optional cache flags to be enabled. |
| GridClientException | In case of error. |
Implemented in GridClientDataProjectionImpl.
| virtual GridClientVariant GridClientData::get | ( | const GridClientVariant & | key | ) | [pure virtual] |
Gets value from cache.
| key | Key. |
| GridClientException | In case of error. | |
| GridClientClosedException | If client was closed manually. | |
| GridServerUnreachableException | If none of the servers can be reached. |
Implemented in GridClientDataProjectionImpl.
| virtual TGridClientVariantMap GridClientData::getAll | ( | const TGridClientVariantSet & | keys | ) | [pure virtual] |
Gets entries from cache.
| keys | Keys. |
| GridClientException | In case of error. | |
| GridClientClosedException | If client was closed manually. |
| GridServerUnreachableException | If none of the servers can be reached. |
Implemented in GridClientDataProjectionImpl.
| virtual TGridClientFutureVariantMap GridClientData::getAllAsync | ( | const TGridClientVariantSet & | keys | ) | [pure virtual] |
Asynchronously gets entries from cache.
| keys | Keys to retrieve. |
Implemented in GridClientDataProjectionImpl.
| virtual TGridClientFutureVariant GridClientData::getAsync | ( | const GridClientVariant & | key | ) | [pure virtual] |
Asynchronously gets value from cache.
| key | key. |
Implemented in GridClientDataProjectionImpl.
| virtual GridClientDataMetrics GridClientData::metrics | ( | ) | [pure virtual] |
Gets metrics for this cache.
| GridClientException | In case of error. | |
| GridClientClosedException | If client was closed manually. | |
| GridServerUnreachableException | If none of the servers can be reached. |
Implemented in GridClientDataProjectionImpl.
| virtual TGridClientFutureDataMetrics GridClientData::metricsAsync | ( | ) | [pure virtual] |
Asynchronously gets metrics for this cache.
Implemented in GridClientDataProjectionImpl.
| virtual TGridClientDataPtr GridClientData::pinNodes | ( | const TGridClientNodeList & | nodes | ) | [pure virtual] |
Gets client data which will only contact specified remote grid node. By default, remote node is determined based on GridClientDataAffinity provided - this method allows to override default behavior and use only specified server for all cache operations.
Use this method when there are other than key-affinity reasons why a certain node should be contacted.
| nodes | Nodes to be included in the projection. |
| GridClientException | If resulting projection is empty. |
Implemented in GridClientDataProjectionImpl.
| virtual bool GridClientData::put | ( | const GridClientVariant & | key, | |
| const GridClientVariant & | val | |||
| ) | [pure virtual] |
Puts value to cache.
| key | Key. | |
| val | Value. |
| GridClientException | In case of error. | |
| GridClientClosedException | If client was closed manually. | |
| GridServerUnreachableException | If none of the servers can be reached. |
Implemented in GridClientDataProjectionImpl.
| virtual bool GridClientData::putAll | ( | const TGridClientVariantMap & | entries | ) | [pure virtual] |
Puts entries to cache.
| entries | Entries. |
| GridClientException | In case of error. | |
| GridClientClosedException | If client was closed manually. | |
| GridServerUnreachableException | If none of the servers can be reached. |
Implemented in GridClientDataProjectionImpl.
| virtual TGridBoolFuturePtr GridClientData::putAllAsync | ( | const TGridClientVariantMap & | entries | ) | [pure virtual] |
Asynchronously puts entries to cache.
| entries | Entries. |
Implemented in GridClientDataProjectionImpl.
| virtual TGridBoolFuturePtr GridClientData::putAsync | ( | const GridClientVariant & | key, | |
| const GridClientVariant & | val | |||
| ) | [pure virtual] |
Asynchronously puts value to cache.
| key | Key | |
| val | Value. |
Implemented in GridClientDataProjectionImpl.
| virtual bool GridClientData::remove | ( | const GridClientVariant & | key | ) | [pure virtual] |
Removes value from cache.
| key | Key. |
| GridClientException | In case of error. | |
| GridClientClosedException | If client was closed manually. | |
| GridServerUnreachableException | If none of the servers can be reached. |
Implemented in GridClientDataProjectionImpl.
| virtual bool GridClientData::removeAll | ( | const TGridClientVariantSet & | keys | ) | [pure virtual] |
Removes entries from cache.
| keys | Keys. |
| GridClientException | In case of error. | |
| GridClientClosedException | If client was closed manually. | |
| GridServerUnreachableException | If none of the servers can be reached. |
Implemented in GridClientDataProjectionImpl.
| virtual TGridBoolFuturePtr GridClientData::removeAllAsync | ( | const TGridClientVariantSet & | keys | ) | [pure virtual] |
Asynchronously removes entries from cache.
| keys | Keys. |
Implemented in GridClientDataProjectionImpl.
| virtual TGridBoolFuturePtr GridClientData::removeAsync | ( | const GridClientVariant & | key | ) | [pure virtual] |
Asynchronously removes value from cache.
| key | key. |
Implemented in GridClientDataProjectionImpl.
| virtual bool GridClientData::replace | ( | const GridClientVariant & | key, | |
| const GridClientVariant & | val | |||
| ) | [pure virtual] |
Replaces value in cache.
| key | Key. | |
| val | Value. |
| GridClientException | In case of error. | |
| GridClientClosedException | If client was closed manually. | |
| GridServerUnreachableException | If none of the servers can be reached. |
Implemented in GridClientDataProjectionImpl.
| virtual TGridBoolFuturePtr GridClientData::replaceAsync | ( | const GridClientVariant & | key, | |
| const GridClientVariant & | val | |||
| ) | [pure virtual] |
Asynchronously replaces value in cache.
| key | key. | |
| val | Value. |
Implemented in GridClientDataProjectionImpl.
1.7.1