Class AltsProtocolNegotiator.LazyChannel

  • Enclosing class:
    AltsProtocolNegotiator

    static final class AltsProtocolNegotiator.LazyChannel
    extends java.lang.Object
    Channel created from a channel pool lazily.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private io.grpc.Channel channel  
      private io.grpc.internal.ObjectPool<io.grpc.Channel> channelPool  
    • Constructor Summary

      Constructors 
      Constructor Description
      LazyChannel​(io.grpc.internal.ObjectPool<io.grpc.Channel> channelPool)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void close()
      Returns the cached channel to the channel pool.
      (package private) io.grpc.Channel get()
      If channel is null, gets a channel from the channel pool, otherwise, returns the cached channel.
      • Methods inherited from class java.lang.Object

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

      • channelPool

        private final io.grpc.internal.ObjectPool<io.grpc.Channel> channelPool
      • channel

        private io.grpc.Channel channel
    • Constructor Detail

      • LazyChannel

        LazyChannel​(io.grpc.internal.ObjectPool<io.grpc.Channel> channelPool)
    • Method Detail

      • get

        io.grpc.Channel get()
        If channel is null, gets a channel from the channel pool, otherwise, returns the cached channel.
      • close

        void close()
        Returns the cached channel to the channel pool.