Class ManagedChannelUtil


  • public final class ManagedChannelUtil
    extends java.lang.Object
    Utilities for working with gRPC channels.

    This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.logging.Logger logger  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ManagedChannelUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static CompletableResultCode shutdownChannel​(io.grpc.ManagedChannel managedChannel)
      Shutdown the gRPC channel.
      static java.util.Map<java.lang.String,​?> toServiceConfig​(java.lang.String serviceName, RetryPolicy retryPolicy)
      Convert the RetryPolicy into a gRPC service config for the serviceName.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        private static final java.util.logging.Logger logger
    • Constructor Detail

      • ManagedChannelUtil

        private ManagedChannelUtil()
    • Method Detail

      • toServiceConfig

        public static java.util.Map<java.lang.String,​?> toServiceConfig​(java.lang.String serviceName,
                                                                              RetryPolicy retryPolicy)
        Convert the RetryPolicy into a gRPC service config for the serviceName. The resulting map can be passed to ManagedChannelBuilder.defaultServiceConfig(Map).
      • shutdownChannel

        public static CompletableResultCode shutdownChannel​(io.grpc.ManagedChannel managedChannel)
        Shutdown the gRPC channel.