Skip to content

Commit

Permalink
Removing deprecated ServiceDiscoveryRetryStrategy (#1949)
Browse files Browse the repository at this point in the history
Motivation:

Recently, `ServiceDiscoveryRetryStrategy` was deprecated. For 0.42
release we intend to remove it.

Modifications:

`ServiceDiscoveryRetryStrategy` and
`DefaultServiceDiscoveryRetryStrategy` have been removed.

Result:

Only the standard retry mechanism is available for `ServiceDiscoverer`
errors in `SingleAddressHttpClientBuilder` and in
`PartitionedHttpClientBuilder`.
  • Loading branch information
Dariusz Jedrzejczyk authored Nov 15, 2021
1 parent 237fecb commit b095506
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 718 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -95,36 +95,12 @@ PartitionedHttpClientBuilder<U, R> serviceDiscoverer(

/**
* Sets a retry strategy to retry errors emitted by {@link ServiceDiscoverer}.
* <p>
* Note, calling this method will unset the value provided via
* {@link #retryServiceDiscoveryErrors(BiIntFunction)} if it was called before.
* @param retryStrategy a retry strategy to retry errors emitted by {@link ServiceDiscoverer}.
* @return {@code this}.
* @see DefaultServiceDiscoveryRetryStrategy.Builder
* @deprecated Use {@link #retryServiceDiscoveryErrors(BiIntFunction)} preferably with the standard utilities from
* {@link io.servicetalk.concurrent.api.RetryStrategies}.
*/
@Deprecated
default PartitionedHttpClientBuilder<U, R> retryServiceDiscoveryErrors(
ServiceDiscoveryRetryStrategy<R, PartitionedServiceDiscovererEvent<R>> retryStrategy) {
throw new UnsupportedOperationException("retryServiceDiscoveryErrors accepting ServiceDiscoveryRetryStrategy" +
" is not supported by " + getClass().getName());
}

/**
* Sets a retry strategy to retry errors emitted by {@link ServiceDiscoverer}.
* <p>
* Note, calling this method will unset the value provided via
* {@link #retryServiceDiscoveryErrors(ServiceDiscoveryRetryStrategy)} if it was called before.
* @param retryStrategy a retry strategy to retry errors emitted by {@link ServiceDiscoverer}.
* @return {@code this}.
* @see io.servicetalk.concurrent.api.RetryStrategies
*/
default PartitionedHttpClientBuilder<U, R> retryServiceDiscoveryErrors(
BiIntFunction<Throwable, ? extends Completable> retryStrategy) {
throw new UnsupportedOperationException("retryServiceDiscoveryErrors accepting BiIntFunction" +
" is not supported by " + getClass().getName());
}
PartitionedHttpClientBuilder<U, R> retryServiceDiscoveryErrors(
BiIntFunction<Throwable, ? extends Completable> retryStrategy);

/**
* Sets the maximum amount of {@link ServiceDiscovererEvent} objects that will be queued for each partition.
Expand Down

This file was deleted.

Loading

0 comments on commit b095506

Please sign in to comment.