com.bazaarvoice.ostrich.LoadBalanceAlgorithm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ostrich-core Show documentation
Show all versions of ostrich-core Show documentation
Core classes that form Ostrich
package com.bazaarvoice.ostrich;
public interface LoadBalanceAlgorithm {
/**
* Selects an end point to use based on a load balancing algorithm. If no end point can be chosen, then
* null
is returned.
*
* @param endPoints The end points to choose from.
* @param statistics Usage statistics about the end points in case the load balancing algorithm needs some
* knowledge of the service pool's state.
* @return Which end point to use or null
if one couldn't be chosen.
*/
ServiceEndPoint choose(Iterable endPoints, ServicePoolStatistics statistics);
}