ChannelPool (Cloud Bigtable HBase Client for Java 0.9.3-SNAPSHOT API)

com.google.cloud.bigtable.grpc.io

Class ChannelPool

  • java.lang.Object
    • io.grpc.Channel
      • io.grpc.ManagedChannel
        • com.google.cloud.bigtable.grpc.io.ChannelPool


  • public class ChannelPool
    extends io.grpc.ManagedChannel
    Manages a set of ClosableChannels and uses them in a round robin.
    Version:
    $Id: $Id
    Author:
    sduskis
    • Field Detail

      • LOG

        protected static final Logger LOG
        Constant LOG
      • STATS

        protected static com.google.cloud.bigtable.grpc.io.ChannelPool.Stats STATS
    • Method Detail

      • getStats

        protected static com.google.cloud.bigtable.grpc.io.ChannelPool.Stats getStats()
      • ensureChannelCount

        public void ensureChannelCount(int capacity)
                                throws IOException
        Makes sure that the number of channels is at least as big as the specified capacity. This method is only synchronized when the pool has to be expanded.
        Parameters:
        capacity - The minimum number of channels required for the RPCs of the ChannelPool's clients.
        Throws:
        IOException - if any.
      • authority

        public String authority()
        Specified by:
        authority in class io.grpc.Channel
      • newCall

        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.

        Specified by:
        newCall in class io.grpc.Channel
      • size

        public int size()

        size.

        Returns:
        a int.
      • shutdown

        public io.grpc.ManagedChannel shutdown()
        Specified by:
        shutdown in class io.grpc.ManagedChannel
      • isShutdown

        public boolean isShutdown()
        Specified by:
        isShutdown in class io.grpc.ManagedChannel
      • isTerminated

        public boolean isTerminated()
        Specified by:
        isTerminated in class io.grpc.ManagedChannel
      • shutdownNow

        public io.grpc.ManagedChannel shutdownNow()
        Specified by:
        shutdownNow in class io.grpc.ManagedChannel


Send feedback about...

Cloud Bigtable Documentation