#include <gridconsistenhashimpl.hpp>
List of all members.
Detailed Description
Implementation of GridClientConsistentHash.
Constructor & Destructor Documentation
| GridClientConsistentHashImpl::GridClientConsistentHashImpl |
( |
|
) |
|
| virtual GridClientConsistentHashImpl::~GridClientConsistentHashImpl |
( |
|
) |
[inline, virtual] |
Member Function Documentation
| void GridClientConsistentHashImpl::addNode |
( |
const NodeInfo & |
node, |
|
|
int |
replicas | |
|
) |
| | [virtual] |
Adds a node to consistent hash algorithm.
- Parameters:
-
| node | New node (if null then no-op). |
| replicas | Number of replicas for the node. |
- Returns:
True if node was added, false if it is null or is already contained in the hash.
| size_t GridClientConsistentHashImpl::circlesSize |
( |
|
) |
const [inline] |
Gets the total elements in the cycle.
- Returns:
- The count of elements in the circle.
| void GridClientConsistentHashImpl::clear |
( |
|
) |
[inline] |
Removes all the nodes and their replicas from the ring.
| std::set< NodeInfo > GridClientConsistentHashImpl::getNodes |
( |
|
) |
const [virtual] |
Gets set of all distinct nodes in the consistent hash (in no particular order).
- Returns:
- Set of all distinct nodes in the consistent hash.
Calculates hash for a hashable object.
- Parameters:
-
| key | Object to calculate hash for. |
- Returns:
- Hash code.
Gets node for a key.
- Parameters:
-
| key | Key. |
| inc | Node IDs to include. |
- Returns:
- Node.
| size_t GridClientConsistentHashImpl::nodesSize |
( |
|
) |
const [inline] |
Gets the total of the unique nodes.
- Returns:
- The count of unique nodes.
| void GridClientConsistentHashImpl::removeNode |
( |
const NodeInfo & |
node |
) |
[virtual] |
Removes a node and all of its replicas.
- Parameters:
-
The documentation for this class was generated from the following files: