public class RetryingDnsServiceDiscovererFilter
extends ServiceDiscovererFilter<String,InetAddress,ServiceDiscovererEvent<InetAddress>>
ServiceDiscoverer.
Throwables that pass shouldRetry(Throwable) are logged, and the retry strategy is invoked. All
other Throwables will result in the Publisher terminating with the Throwable.
| Constructor and Description |
|---|
RetryingDnsServiceDiscovererFilter(ServiceDiscoverer<String,InetAddress,ServiceDiscovererEvent<InetAddress>> delegate,
BiIntFunction<Throwable,Completable> retryStrategy)
Create an instance of the filter.
|
| Modifier and Type | Method and Description |
|---|---|
Publisher<ServiceDiscovererEvent<InetAddress>> |
discover(String unresolvedAddress) |
protected boolean |
shouldRetry(Throwable cause)
Determines which
Throwables should be retried. |
public RetryingDnsServiceDiscovererFilter(ServiceDiscoverer<String,InetAddress,ServiceDiscovererEvent<InetAddress>> delegate,
BiIntFunction<Throwable,Completable> retryStrategy)
delegate - the ServiceDiscoverer to delegate toretryStrategy - the retry strategy to applypublic Publisher<ServiceDiscovererEvent<InetAddress>> discover(String unresolvedAddress)
discover in interface ServiceDiscoverer<String,InetAddress,ServiceDiscovererEvent<InetAddress>>discover in class ServiceDiscovererFilter<String,InetAddress,ServiceDiscovererEvent<InetAddress>>protected boolean shouldRetry(Throwable cause)
Throwables should be retried.cause - the Throwable to checkPublisher