Public Member Functions

GridClientDataAffinity Class Reference

#include <gridclientdataaffinity.hpp>

Inheritance diagram for GridClientDataAffinity:
GridClientPartitionAffinity

List of all members.

Public Member Functions

virtual ~GridClientDataAffinity ()
virtual TGridClientNodePtr getNode (const TNodesSet &nodes, const GridClientHasheableObject &key)=0

Detailed Description

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.


Constructor & Destructor Documentation

virtual GridClientDataAffinity::~GridClientDataAffinity (  )  [inline, virtual]

Destructor.


Member Function Documentation

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.

Parameters:
nodes The current topology snapshot.
key Key to get affinity for.
Returns:
Affinity nodes for the given partition.

Implemented in GridClientPartitionAffinity.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends