public class XSimpleRestRetryTemplate extends Object implements XRestRetryTemplate
XRestRetryTemplate| Constructor and Description |
|---|
XSimpleRestRetryTemplate()
Constructor
|
XSimpleRestRetryTemplate(Class<E>... classes)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
execute(Supplier<T> supplier)
Execute
|
XSimpleRestRetryTemplate |
setBackOffPeriod(Duration period)
Set back off period
|
XSimpleRestRetryTemplate |
setMaxAttempts(int maxAttempts)
Set max attempts
|
public XSimpleRestRetryTemplate()
@SafeVarargs public XSimpleRestRetryTemplate(@NonNull Class<E>... classes)
E - RestClientException typeclasses - classespublic XSimpleRestRetryTemplate setBackOffPeriod(@NonNull Duration period)
period - periodXSimpleRestRetryTemplatepublic XSimpleRestRetryTemplate setMaxAttempts(int maxAttempts)
maxAttempts - max attemptsXSimpleRestRetryTemplatepublic <T> T execute(@NonNull
Supplier<T> supplier)
throws org.springframework.web.client.RestClientException
XRestRetryTemplateexecute in interface XRestRetryTemplateT - response typesupplier - SupplierRestClientException - if failed to executeCopyright © 2017–2018 SPT. All rights reserved.