Package io.servicetalk.client.api
Interface LoadBalancedAddress<C extends LoadBalancedConnection>
-
- Type Parameters:
C- type ofLoadBalancedConnection.
- All Superinterfaces:
AsyncCloseable,ListenableAsyncCloseable,ScoreSupplier
public interface LoadBalancedAddress<C extends LoadBalancedConnection> extends ListenableAsyncCloseable, ScoreSupplier
An address managed by aLoadBalancer.Note:
ScoreSuppliercontract provides this address' score, where 0.0 is the lowest score and 1.0 is the highest.LoadBalancers prefer addresses with a higher score.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Single<C>newConnection()Creates and asynchronously returns a connection for this address.-
Methods inherited from interface io.servicetalk.concurrent.api.AsyncCloseable
closeAsync, closeAsyncGracefully
-
Methods inherited from interface io.servicetalk.concurrent.api.ListenableAsyncCloseable
onClose
-
Methods inherited from interface io.servicetalk.client.api.ScoreSupplier
score
-
-
-
-
Method Detail
-
newConnection
Single<C> newConnection()
Creates and asynchronously returns a connection for this address.- Returns:
Singlethat emits the createdLoadBalancedConnection.
-
-