private ManagedChannel getDataChannelPool() throws IOException { String host = options.getDataHost(); int channelCount = options.getChannelCount(); if (options.useCachedChannel()) { synchronized (BigtableSession.class) { // TODO: Ensure that the host and channelCount are the same. if (cachedDataChannelPool == null) { cachedDataChannelPool = createChannelPool(host, channelCount); } return cachedDataChannelPool; } } return createManagedPool(host, channelCount); }