@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,
boolean alwaysEnableTLS)
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, boolean alwaysEnableTLS)
ManagedChannel
.networkGroup
- network groupserverAddress
- server addressconf
- the Alluxio configurationalwaysEnableTLS
- whether to always enable TLSGrpcChannel
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.