Source:
AzureCloudDestination(CloudConfig cloudConfig, AzureCloudConfig azureCloudConfig, String clusterName, AzureMetrics azureMetrics) throws URISyntaxException, InvalidKeyException { this.azureMetrics = azureMetrics; azureAccount = CloudStorageAccount.parse(azureCloudConfig.azureStorageConnectionString); azureBlobClient = azureAccount.createCloudBlobClient(); this.clusterName = clusterName; if (cloudConfig.vcrProxyHost != null) { logger.info("Using proxy: {}:{}", cloudConfig.vcrProxyHost, cloudConfig.vcrProxyPort); OperationContext.setDefaultProxy( new Proxy(Proxy.Type.HTTP, new InetSocketAddress(cloudConfig.vcrProxyHost, cloudConfig.vcrProxyPort))); } ConnectionPolicy connectionPolicy = new ConnectionPolicy(); if (azureCloudConfig.cosmosDirectHttps) { logger.info("Using CosmosDB DirectHttps connection mode"); connectionPolicy.setConnectionMode(ConnectionMode.Direct); } if (cloudConfig.vcrProxyHost != null) { connectionPolicy.setProxy(cloudConfig.vcrProxyHost, cloudConfig.vcrProxyPort); } asyncDocumentClient = new AsyncDocumentClient.Builder().withServiceEndpoint(azureCloudConfig.cosmosEndpoint) .withMasterKeyOrResourceToken(azureCloudConfig.cosmosKey) .withConnectionPolicy(connectionPolicy) .withConsistencyLevel(ConsistencyLevel.Session) .build(); cosmosDataAccessor = new CosmosDataAccessor(asyncDocumentClient, azureCloudConfig, azureMetrics); this.retentionPeriodMs = TimeUnit.DAYS.toMillis(cloudConfig.cloudDeletedBlobRetentionDays); this.deadBlobsQueryLimit = cloudConfig.cloudBlobCompactionQueryLimit; logger.info("Created Azure destination"); }

Target:
AzureCloudDestination(CloudConfig cloudConfig, AzureCloudConfig azureCloudConfig, String clusterName, AzureMetrics azureMetrics) throws URISyntaxException, InvalidKeyException { this.azureMetrics = azureMetrics; azureAccount = CloudStorageAccount.parse(azureCloudConfig.azureStorageConnectionString); azureBlobClient = azureAccount.createCloudBlobClient(); this.clusterName = clusterName; if (cloudConfig.vcrProxyHost != null) { logger.info("Using proxy: {}:{}", cloudConfig.vcrProxyHost, cloudConfig.vcrProxyPort); OperationContext.setDefaultProxy( new Proxy(Proxy.Type.HTTP, new InetSocketAddress(cloudConfig.vcrProxyHost, cloudConfig.vcrProxyPort))); } ConnectionPolicy connectionPolicy = new ConnectionPolicy(); RetryOptions retryOptions = new RetryOptions(); retryOptions.setMaxRetryAttemptsOnThrottledRequests(azureCloudConfig.cosmosMaxRetries); connectionPolicy.setRetryOptions(retryOptions); if (azureCloudConfig.cosmosDirectHttps) { logger.info("Using CosmosDB DirectHttps connection mode"); connectionPolicy.setConnectionMode(ConnectionMode.Direct); } if (cloudConfig.vcrProxyHost != null) { connectionPolicy.setProxy(cloudConfig.vcrProxyHost, cloudConfig.vcrProxyPort); } asyncDocumentClient = new AsyncDocumentClient.Builder().withServiceEndpoint(azureCloudConfig.cosmosEndpoint) .withMasterKeyOrResourceToken(azureCloudConfig.cosmosKey) .withConnectionPolicy(connectionPolicy) .withConsistencyLevel(ConsistencyLevel.Session) .build(); cosmosDataAccessor = new CosmosDataAccessor(asyncDocumentClient, azureCloudConfig, azureMetrics); this.retentionPeriodMs = TimeUnit.DAYS.toMillis(cloudConfig.cloudDeletedBlobRetentionDays); this.deadBlobsQueryLimit = cloudConfig.cloudBlobCompactionQueryLimit; logger.info("Created Azure destination"); }