Public Member Functions

GridGain.Client.Balancer.GridClientRandomBalancer Class Reference

Simple balancer that relies on random node selection from a given collection. More...

Inherits GridGain::Client::Balancer::IGridClientLoadBalancer.

List of all members.

Public Member Functions

IGridClientNode BalancedNode< TNode > (ICollection< TNode > nodes)
 Picks up a random node from a collection.

Detailed Description

This implementation has no caches and treats each given collection as a new one. More strictly, for any non-empty collection of size n the probability of selection of any node in this collection will be 1/n.


Member Function Documentation

IGridClientNode GridGain.Client.Balancer.GridClientRandomBalancer.BalancedNode< TNode > ( ICollection< TNode >  nodes  ) 
Parameters:
nodes Nodes to pick from.
Returns:
Random node from collection.

Implements GridGain.Client.Balancer.IGridClientLoadBalancer.

Type Constraints
TNode :IGridClientNode