@ThreadSafe public abstract static class LoadBalancer2.Helper extends Object
| Constructor and Description |
|---|
Helper() |
| Modifier and Type | Method and Description |
|---|---|
abstract ManagedChannel |
createOobChannel(EquivalentAddressGroup eag,
String authority)
Out-of-band channel for LoadBalancer’s own RPC needs, e.g., talking to an external
load-balancer service.
|
abstract LoadBalancer2.Subchannel |
createSubchannel(EquivalentAddressGroup addrs,
Attributes attrs)
Creates a Subchannel, which is a logical connection to the given group of addresses which are
considered equivalent.
|
abstract String |
getAuthority()
Returns the authority string of the channel, which is derived from the DNS-style target name.
|
abstract NameResolver.Factory |
getNameResolverFactory()
Returns the NameResolver of the channel.
|
abstract void |
runSerialized(Runnable task)
Schedule a task to be run in the Channel Executor, which serializes the task with the
callback methods on the
LoadBalancer2 interface. |
abstract void |
updatePicker(LoadBalancer2.SubchannelPicker picker)
Set a new picker to the channel.
|
public abstract LoadBalancer2.Subchannel createSubchannel(EquivalentAddressGroup addrs, Attributes attrs)
attrs are custom attributes associated with this
Subchannel, and can be accessed later through Subchannel.getAttributes().
The LoadBalancer is responsible for closing unused Subchannels, and closing all
Subchannels within LoadBalancer2.shutdown().
public abstract ManagedChannel createOobChannel(EquivalentAddressGroup eag, String authority)
The LoadBalancer is responsible for closing unused OOB channels, and closing all OOB
channels within LoadBalancer2.shutdown().
public abstract void updatePicker(LoadBalancer2.SubchannelPicker picker)
When a new picker is provided via updatePicker(), the channel will apply the
picker on all buffered RPCs, by calling SubchannelPicker.pickSubchannel().
The channel will hold the picker and use it for all RPCs, until updatePicker() is
called again and a new picker replaces the old one. If updatePicker() has never been
called, the channel will buffer all RPCs until a picker is provided.
public abstract void runSerialized(Runnable task)
LoadBalancer2 interface.public abstract NameResolver.Factory getNameResolverFactory()
public abstract String getAuthority()