Service API allows the client to set installation retry value using RequestConfig
parameter.
fun install(data: String, callback: IResponseCallback<InstallationResponse,
InstallationError, InstallationProgress>? = null,
metadata: Bundle = Bundle(),
action: Bundle = Bundle(),
config: RequestConfig = RequestConfig())
RequestConfig
allows the client to set different options during install and is passed along with the corresponding request. Currently, the Ignite Services Client SDK supports RetryPolicy
which can be created using RetryPolicy.Builder
.
To specify custom RetryPolicy
, use the following builder pattern:
val requestConfig = RequestConfig(retryPolicy = RetryPolicy.Builder()
.retries(5)
.retry500s(true)
.retryConnectionFailures(false)
.build())
and pass them to the installation request:
IgniteServiceSdk.instance().install(data,
callback,
metadata,
config = requestConfig)
If you do not specify a RetryPolicy
, Ignite uses the following default configuration for retry options:
- retries
- Number of install retries. This defaults to
0
. - retry500s
- Retry on server errors. This defaults to
true
. - retryConnectionFailures
- Retry in case of connectivity issues. This defaults to
true
.