public class GrpcChannel extends io.grpc.Channel implements AutoCloseable
Modifier | Constructor and Description |
---|---|
protected |
GrpcChannel(GrpcChannelKey channelKey,
io.grpc.ManagedChannel managedChannel)
Creates a new connection object.
|
Modifier and Type | Method and Description |
---|---|
protected void |
authenticate(AuthType authType,
Subject subject,
AlluxioConfiguration config) |
String |
authority() |
void |
close()
Releases the connection to the pool.
|
boolean |
equals(Object other) |
io.grpc.Channel |
getChannel() |
GrpcChannelKey |
getChannelKey() |
int |
hashCode() |
void |
intercept(io.grpc.ClientInterceptor interceptor)
Registers interceptor to the channel.
|
boolean |
isHealthy() |
boolean |
isShutdown() |
<RequestT,ResponseT> |
newCall(io.grpc.MethodDescriptor<RequestT,ResponseT> methodDescriptor,
io.grpc.CallOptions callOptions) |
void |
shutdown()
Shuts down the channel.
|
protected GrpcChannel(GrpcChannelKey channelKey, io.grpc.ManagedChannel managedChannel)
channelKey
- gRPC channel keymanagedChannel
- the underlying gRPC ManagedChannel
public GrpcChannelKey getChannelKey()
public io.grpc.Channel getChannel()
public <RequestT,ResponseT> io.grpc.ClientCall<RequestT,ResponseT> newCall(io.grpc.MethodDescriptor<RequestT,ResponseT> methodDescriptor, io.grpc.CallOptions callOptions)
newCall
in class io.grpc.Channel
public String authority()
authority
in class io.grpc.Channel
protected void authenticate(AuthType authType, Subject subject, AlluxioConfiguration config) throws AlluxioStatusException
AlluxioStatusException
public void intercept(io.grpc.ClientInterceptor interceptor)
interceptor
- the gRPC client interceptorpublic void shutdown()
public boolean isShutdown()
true
if the channel has been shut downpublic boolean isHealthy()
true
if channel is healthypublic void close()
close
in interface AutoCloseable
Copyright © 2023. All Rights Reserved.