@ThreadSafe public class GrpcConnectionPool extends Object
GrpcChannelBuilder
and GrpcChannel
.Modifier and Type | Field and Description |
---|---|
static GrpcConnectionPool |
INSTANCE |
Constructor and Description |
---|
GrpcConnectionPool()
Creates a new
GrpcConnectionPool . |
Modifier and Type | Method and Description |
---|---|
GrpcConnection |
acquireConnection(GrpcChannelKey channelKey,
AlluxioConfiguration conf)
Acquires and increases the ref-count for the
ManagedChannel . |
void |
releaseConnection(GrpcConnectionKey connectionKey,
AlluxioConfiguration conf)
Decreases the ref-count of the
ManagedChannel for the given address. |
public static final GrpcConnectionPool INSTANCE
public GrpcConnectionPool()
GrpcConnectionPool
.public GrpcConnection acquireConnection(GrpcChannelKey channelKey, AlluxioConfiguration conf)
ManagedChannel
.channelKey
- the channel keyconf
- the Alluxio configurationGrpcConnection
public void releaseConnection(GrpcConnectionKey connectionKey, AlluxioConfiguration conf)
ManagedChannel
for the given address. It shuts down the
underlying channel if reference count reaches zero.connectionKey
- the connection keyconf
- the Alluxio configurationCopyright © 2023. All Rights Reserved.