public RegionReplicaSinkWriter(
        RegionReplicaOutputSink sink,
        ClusterConnection connection,
        ExecutorService pool,
        int operationTimeout) {
      this.sink = sink;
      this.connection = connection;
      this.operationTimeout = operationTimeout;
      this.rpcRetryingCallerFactory =
          RpcRetryingCallerFactory.instantiate(connection.getConfiguration());
      this.rpcControllerFactory = RpcControllerFactory.instantiate(connection.getConfiguration());
      this.pool = pool;

      int nonExistentTableCacheExpiryMs =
          connection
              .getConfiguration()
              .getInt(
                  "hbase.region.replica.replication.cache.disabledAndDroppedTables.expiryMs", 5000);
      // A cache for non existing tables that have a default expiry of 5 sec. This means that if the
      // table is created again with the same name, we might miss to replicate for that amount of
      // time. But this cache prevents overloading meta requests for every edit from a deleted file.
      disabledAndDroppedTables =
          CacheBuilder.newBuilder()
              .expireAfterWrite(nonExistentTableCacheExpiryMs, TimeUnit.MILLISECONDS)
              .initialCapacity(10)
              .maximumSize(1000)
              .build();
    }