diff --git a/site/src/pages/docs/client-retry.mdx b/site/src/pages/docs/client-retry.mdx index 54295eee940..67a3f201350 100644 --- a/site/src/pages/docs/client-retry.mdx +++ b/site/src/pages/docs/client-retry.mdx @@ -221,7 +221,10 @@ the maximum number of total attempts to 10 by default. You can change this value `maxTotalAttempts` when you build a : ```java -RetryingClient.newDecorator(rule, maxTotalAttempts); +RetryConfig config = RetryConfig.builder(rule) + .maxTotalAttempts(maxTotalAttempts) + .build(); +RetryingClient.newDecorator(config); ``` Or, you can override the default value of 10 using the JVM system property @@ -246,8 +249,11 @@ Second, it occurs when the time of individual attempt in retry has passed the ti You can configure it when you create the decorator: ```java -RetryingClient.newDecorator(rule, maxTotalAttempts, - responseTimeoutMillisForEachAttempt); +RetryConfig config = RetryConfig.builder(rule) + .maxTotalAttempts(maxTotalAttempts) + .responseTimeoutMillisForEachAttempt(responseTimeoutMillisForEachAttempt) + .build(); +RetryingClient.newDecorator(config); ``` You can retry on this . diff --git a/site/src/pages/docs/client-thrift.mdx b/site/src/pages/docs/client-thrift.mdx index 846d323dcce..427c6b52add 100644 --- a/site/src/pages/docs/client-thrift.mdx +++ b/site/src/pages/docs/client-thrift.mdx @@ -41,10 +41,10 @@ using . import com.linecorp.armeria.common.thrift.ThriftSerializationFormats; HelloService.Iface helloService = - ThriftClient.builder("http://127.0.0.1:8080") - .path("/hello") - .serializationFormat(ThriftSerializationFormats.JSON) - .build(HelloService.Iface.class); // or AsyncIface.class + ThriftClients.builder("http://127.0.0.1:8080") + .path("/hello") + .serializationFormat(ThriftSerializationFormats.JSON) + .build(HelloService.Iface.class); // or AsyncIface.class ``` Since we specified `HelloService.Iface` as the client type, `ThriftClients.newClient()` will return a