Package io.grpc

Class LoadBalancer.SubchannelPicker

  • Direct Known Subclasses:
    LoadBalancer.ErrorPicker, LoadBalancer.FixedResultPicker
    Enclosing class:
    LoadBalancer

    @ThreadSafe
    @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1771")
    public abstract static class LoadBalancer.SubchannelPicker
    extends java.lang.Object
    The main balancing logic. It must be thread-safe. Typically it should only synchronize on its own state, and avoid synchronizing with the LoadBalancer's state.
    Since:
    1.2.0
    • Constructor Detail

      • SubchannelPicker

        public SubchannelPicker()
    • Method Detail

      • requestConnection

        @Deprecated
        public void requestConnection()
        Deprecated.
        Tries to establish connections now so that the upcoming RPC may then just pick a ready connection without having to connect first.

        No-op if unsupported.

        Since:
        1.11.0