#include <gridclientdataaffinity.hpp>
Public Member Functions | |
| virtual | ~GridClientDataAffinity () |
| virtual TGridClientNodePtr | getNode (const TNodesSet &nodes, const GridClientHasheableObject &key)=0 |
Interface that will determine which node should be connected by the client when operation on a key is requested.
If implementation of data affinity implements GridClientTopologyListener interface as well, then affinity will be added to topology listeners on client start before firs connection is established and will be removed after last connection is closed.
| virtual GridClientDataAffinity::~GridClientDataAffinity | ( | ) | [inline, virtual] |
Destructor.
| virtual TGridClientNodePtr GridClientDataAffinity::getNode | ( | const TNodesSet & | nodes, | |
| const GridClientHasheableObject & | key | |||
| ) | [pure virtual] |
Gets affinity node for a key for the given topology snapshot. In case of replicated cache, all returned nodes are updated in the same manner. In case of partitioned cache, the returned list should contain only the primary and back up nodes with primary node being always first.
| nodes | The current topology snapshot. | |
| key | Key to get affinity for. |
Implemented in GridClientPartitionAffinity.
1.7.1