public class ChannelPool
extends io.grpc.ManagedChannel
Modifier and Type | Class | Description |
---|---|---|
static interface |
ChannelPool.ChannelFactory |
A factory for creating ManagedChannels to be used in a
ChannelPool . |
Modifier and Type | Field | Description |
---|---|---|
protected static Logger |
LOG |
Constant
LOG |
protected static com.google.cloud.bigtable.grpc.io.ChannelPool.Stats |
STATS |
Constructor | Description |
---|---|
ChannelPool(ChannelPool.ChannelFactory factory,
int count) |
Constructor for ChannelPool.
|
Modifier and Type | Method | Description |
---|---|---|
String |
authority() |
|
boolean |
awaitTermination(long timeout,
TimeUnit unit) |
|
static String |
extractIdentifier(io.grpc.Metadata trailers) |
|
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
Constructor for ChannelPool.
factory
- a ChannelPool.ChannelFactory
object.IOException
- if any.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()
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