public class GrpcConnection extends Object implements AutoCloseable
Constructor and Description |
---|
GrpcConnection(GrpcConnectionKey key,
io.grpc.ManagedChannel managedChannel,
AlluxioConfiguration conf)
Creates a new connection object.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases the connection to the pool.
|
boolean |
equals(Object other) |
io.grpc.Channel |
getChannel() |
GrpcChannelKey |
getChannelKey() |
AlluxioConfiguration |
getConfiguration() |
int |
hashCode() |
void |
interceptChannel(io.grpc.ClientInterceptor interceptor)
Registers interceptor to the channel.
|
public GrpcConnection(GrpcConnectionKey key, io.grpc.ManagedChannel managedChannel, AlluxioConfiguration conf)
key
- gRPC channel keymanagedChannel
- the underlying gRPC ManagedChannel
conf
- the Alluxio configurationpublic GrpcChannelKey getChannelKey()
public io.grpc.Channel getChannel()
public void interceptChannel(io.grpc.ClientInterceptor interceptor)
interceptor
- the gRPC client interceptorpublic AlluxioConfiguration getConfiguration()
public void close() throws Exception
close
in interface AutoCloseable
Exception
- not expectedCopyright © 2023. All Rights Reserved.