Package io.grpc.alts.internal
Class AltsProtocolNegotiator.LazyChannel
java.lang.Object
io.grpc.alts.internal.AltsProtocolNegotiator.LazyChannel
- Enclosing class:
AltsProtocolNegotiator
Channel created from a channel pool lazily.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate io.grpc.Channel
private final io.grpc.internal.ObjectPool
<io.grpc.Channel> -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
channelPool
private final io.grpc.internal.ObjectPool<io.grpc.Channel> channelPool -
channel
private io.grpc.Channel channel
-
-
Constructor Details
-
LazyChannel
LazyChannel(io.grpc.internal.ObjectPool<io.grpc.Channel> channelPool)
-
-
Method Details
-
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.
-