Search in sources :

Example 1 with UriRestClientKey

use of org.apache.gobblin.restli.UriRestClientKey in project incubator-gobblin by apache.

the class RedirectAwareRestClientRequestSender method updateRestClient.

@VisibleForTesting
void updateRestClient(String uri, String reason) throws NotConfiguredException {
    log.info(String.format("Switching to server prefix %s due to: %s", uri, reason));
    this.currentServerPrefix = uri;
    this.restClient = (RestClient) this.broker.getSharedResource(new SharedRestClientFactory(), new UriRestClientKey(RestliLimiterFactory.RESTLI_SERVICE_NAME, uri));
}
Also used : UriRestClientKey(org.apache.gobblin.restli.UriRestClientKey) SharedRestClientFactory(org.apache.gobblin.restli.SharedRestClientFactory) VisibleForTesting(com.google.common.annotations.VisibleForTesting)

Aggregations

VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 SharedRestClientFactory (org.apache.gobblin.restli.SharedRestClientFactory)1 UriRestClientKey (org.apache.gobblin.restli.UriRestClientKey)1