C - type of LoadBalancedConnection.public interface LoadBalancedAddress<C extends LoadBalancedConnection> extends ListenableAsyncCloseable, ScoreSupplier
LoadBalancer.
Note: ScoreSupplier contract provides this address' score, where 0.0 is the lowest score and 1.0 is the
highest. LoadBalancers prefer addresses with a higher score.
Note: Weight provides a way to influence the selection of the connection with external factors.
With a range of 0.1 to 1.0 influencing the connection score for selectivity.
| Modifier and Type | Method and Description |
|---|---|
Single<C> |
newConnection()
Creates and asynchronously returns a connection for this address.
|
default float |
weight(float weight)
Enables addresses scoring to be influenced by a weight factor.
|
scoreSingle<C> newConnection()
Single that emits the created LoadBalancedConnection.default float weight(float weight)
weight - The new weight.