diff --git a/google-cloud-bigquerystorage/clirr-ignored-differences.xml b/google-cloud-bigquerystorage/clirr-ignored-differences.xml
index c5f0600724..c55b8a691c 100644
--- a/google-cloud-bigquerystorage/clirr-ignored-differences.xml
+++ b/google-cloud-bigquerystorage/clirr-ignored-differences.xml
@@ -108,4 +108,38 @@
TODO: support updated schema
*/
-public class ConnectionWorker implements AutoCloseable {
+class ConnectionWorker implements AutoCloseable {
private static final Logger log = Logger.getLogger(StreamWriter.class.getName());
private Lock lock;
diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPool.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPool.java
index 7bcb358eea..0e6b5eab3a 100644
--- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPool.java
+++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorkerPool.java
@@ -21,6 +21,7 @@
import com.google.auto.value.AutoValue;
import com.google.cloud.bigquery.storage.v1.ConnectionWorker.Load;
import com.google.cloud.bigquery.storage.v1.ConnectionWorker.TableSchemaAndTimestamp;
+import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import com.google.common.base.Stopwatch;
import com.google.common.collect.ImmutableList;
@@ -192,7 +193,7 @@ public abstract static class Builder {
/** Static setting for connection pool. */
private static Settings settings = Settings.builder().build();
- public ConnectionWorkerPool(
+ ConnectionWorkerPool(
long maxInflightRequests,
long maxInflightBytes,
java.time.Duration maxRetryDuration,
@@ -218,13 +219,12 @@ public static void setOptions(Settings settings) {
}
/** Distributes the writing of a message to an underlying connection. */
- public ApiFuture The corresponding worker is not closed until there is no stream reference is targeting to
* that worker.
*/
- public void close(StreamWriter streamWriter) {
+ void close(StreamWriter streamWriter) {
lock.lock();
try {
streamWriterToConnection.remove(streamWriter);
@@ -403,7 +403,7 @@ public void close(StreamWriter streamWriter) {
}
/** Fetch the wait seconds from corresponding worker. */
- public long getInflightWaitSeconds(StreamWriter streamWriter) {
+ long getInflightWaitSeconds(StreamWriter streamWriter) {
lock.lock();
try {
ConnectionWorker connectionWorker = streamWriterToConnection.get(streamWriter);
@@ -422,7 +422,8 @@ TableSchemaAndTimestamp getUpdatedSchema(StreamWriter streamWriter) {
}
/** Enable Test related logic. */
- public static void enableTestingLogic() {
+ @VisibleForTesting
+ static void enableTestingLogic() {
enableTesting = true;
}