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. LoadBalancer
s prefer addresses with a higher score.
Modifier and Type | Method and Description |
---|---|
Single<C> |
newConnection()
Creates and asynchronously returns a connection for this address.
|
onClose
closeAsync, closeAsyncGracefully
score
Single<C> newConnection()
Single
that emits the created LoadBalancedConnection
.