@InternalApi(value="For internal usage only")
public class ChannelPool
extends io.grpc.ManagedChannel
For internal use only - public for technical reasons.
Modifier and Type | Class and Description |
---|---|
static interface |
ChannelPool.ChannelFactory
A factory for creating ManagedChannels to be used in a
ChannelPool . |
Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOG
Constant
LOG |
protected static com.google.cloud.bigtable.grpc.io.ChannelPool.Stats |
STATS |
Constructor and Description |
---|
ChannelPool(ChannelPool.ChannelFactory factory,
int count)
Constructor for ChannelPool.
|
Modifier and Type | Method and Description |
---|---|
String |
authority() |
boolean |
awaitTermination(long timeout,
TimeUnit unit) |
static String |
extractIdentifier(io.grpc.Metadata trailers)
For internal use only - public for technical reasons.
|
protected static com.google.cloud.bigtable.grpc.io.ChannelPool.Stats |
getStats() |
boolean |
isShutdown() |
boolean |
isTerminated() |
<ReqT,RespT> |
newCall(io.grpc.MethodDescriptor<ReqT,RespT> methodDescriptor,
io.grpc.CallOptions callOptions) |
io.grpc.ManagedChannel |
shutdown() |
io.grpc.ManagedChannel |
shutdownNow() |
int |
size()
size.
|
protected static final Logger LOG
LOG
protected static com.google.cloud.bigtable.grpc.io.ChannelPool.Stats STATS
public ChannelPool(ChannelPool.ChannelFactory factory, int count) throws IOException
factory
- a ChannelPool.ChannelFactory
object.IOException
- if any.@InternalApi(value="For internal usage only") public static final String extractIdentifier(io.grpc.Metadata trailers)
protected static com.google.cloud.bigtable.grpc.io.ChannelPool.Stats getStats()
public String authority()
authority
in class io.grpc.Channel
public <ReqT,RespT> io.grpc.ClientCall<ReqT,RespT> newCall(io.grpc.MethodDescriptor<ReqT,RespT> methodDescriptor, io.grpc.CallOptions callOptions)
Create a ClientCall
on a Channel from the pool chosen in a round-robin fashion to
the remote operation specified by the given MethodDescriptor
. The returned ClientCall
does not trigger any remote behavior until ClientCall.start(ClientCall.Listener, io.grpc.Metadata)
is invoked.
newCall
in class io.grpc.Channel
public int size()
public io.grpc.ManagedChannel shutdown()
shutdown
in class io.grpc.ManagedChannel
public boolean isShutdown()
isShutdown
in class io.grpc.ManagedChannel
public boolean isTerminated()
isTerminated
in class io.grpc.ManagedChannel
public io.grpc.ManagedChannel shutdownNow()
shutdownNow
in class io.grpc.ManagedChannel
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
awaitTermination
in class io.grpc.ManagedChannel
InterruptedException