@ThreadSafe public class GrpcChannelPool extends Object
GrpcChannelBuilder
and GrpcChannel
.Modifier and Type | Field and Description |
---|---|
static GrpcChannelPool |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
GrpcChannel |
acquireChannel(GrpcNetworkGroup networkGroup,
GrpcServerAddress serverAddress,
AlluxioConfiguration conf)
Acquires and increases the ref-count for the
ManagedChannel . |
void |
releaseConnection(GrpcChannelKey channelKey)
Decreases the ref-count of the
ManagedChannel for the given address. |
public static final GrpcChannelPool INSTANCE
public GrpcChannel acquireChannel(GrpcNetworkGroup networkGroup, GrpcServerAddress serverAddress, AlluxioConfiguration conf)
ManagedChannel
.networkGroup
- network groupserverAddress
- server addressconf
- the Alluxio configurationGrpcChannel
public void releaseConnection(GrpcChannelKey channelKey)
ManagedChannel
for the given address. It shuts down the
underlying channel if reference count reaches zero.channelKey
- the connection keyCopyright © 2023. All Rights Reserved.