Skip to content

Commit 5443c9c

Browse files
committed
docs: update cffu version to released v2.0.7 📚
1 parent 6d3a690 commit 5443c9c

File tree

3 files changed

+45
-45
lines changed

3 files changed

+45
-45
lines changed

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ Migrating to the `Cffu` class involves two simple changes:
232232

233233
2\) If you cannot modify code that uses `CompletableFuture` (such as `CF` returned from external libraries)
234234

235-
Use the [`CffuFactory.toCffu(CompletionStage)` method](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/CffuFactory.html#toCffu(java.util.concurrent.CompletionStage))
235+
Use the [`CffuFactory.toCffu(CompletionStage)` method](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/CffuFactory.html#toCffu(java.util.concurrent.CompletionStage))
236236
to convert `CompletableFuture` or `CompletionStage` to `Cffu` type.
237237

238238
### 1.3 dependencies (including `CompletableFutureUtils` utility class)
@@ -243,18 +243,18 @@ to convert `CompletableFuture` or `CompletionStage` to `Cffu` type.
243243
<dependency>
244244
<groupId>io.foldright</groupId>
245245
<artifactId>cffu2</artifactId>
246-
<version>2.0.6</version>
246+
<version>2.0.7</version>
247247
</dependency>
248248
```
249249
- For `Gradle` projects:
250250

251251
Gradle Kotlin DSL
252252
```groovy
253-
implementation("io.foldright:cffu2:2.0.6")
253+
implementation("io.foldright:cffu2:2.0.7")
254254
```
255255
Gradle Groovy DSL
256256
```groovy
257-
implementation 'io.foldright:cffu2:2.0.6'
257+
implementation 'io.foldright:cffu2:2.0.7'
258258
```
259259

260260
## 2. `cffu` feature introduction
@@ -689,7 +689,7 @@ You should only handle specific exceptions that the current business clearly und
689689
and can recover from, letting outer layers handle other exceptions;
690690
avoid masking bugs or incorrectly handling exceptions that you cannot recover from.
691691

692-
`cffu` provides corresponding [`catching*` methods](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/CompletableFutureUtils.html#catching(F,java.lang.Class,java.util.function.Function))
692+
`cffu` provides corresponding [`catching*` methods](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/CompletableFutureUtils.html#catching(F,java.lang.Class,java.util.function.Function))
693693
that support specifying exception types to handle; compared to the `CF#exceptionally` method,
694694
it adds an exception type parameter, with similar usage, so no code example is provided.
695695

@@ -721,18 +721,18 @@ Because timeout and delayed execution are basic functionalities, once they fail,
721721

722722
The `cffu` library provides timeout-safe new implementation methods:
723723

724-
- [`Cffu#orTimeout()`](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/BaseCffu.html#orTimeout(long,java.util.concurrent.TimeUnit))
725-
/ [`Cffu#completeOnTimeoutTimeout()`](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/BaseCffu.html#completeOnTimeout(java.lang.Object,long,java.util.concurrent.TimeUnit))
726-
- [`CFU#cffuOrTimeout()`](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/CompletableFutureUtils.html#cffuOrTimeout(F,long,java.util.concurrent.TimeUnit))
727-
/ [`CFU#cffuCompleteOnTimeout()`](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/CompletableFutureUtils.html#cffuCompleteOnTimeout(F,T,long,java.util.concurrent.TimeUnit))
724+
- [`Cffu#orTimeout()`](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/BaseCffu.html#orTimeout(long,java.util.concurrent.TimeUnit))
725+
/ [`Cffu#completeOnTimeoutTimeout()`](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/BaseCffu.html#completeOnTimeout(java.lang.Object,long,java.util.concurrent.TimeUnit))
726+
- [`CFU#cffuOrTimeout()`](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/CompletableFutureUtils.html#cffuOrTimeout(F,long,java.util.concurrent.TimeUnit))
727+
/ [`CFU#cffuCompleteOnTimeout()`](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/CompletableFutureUtils.html#cffuCompleteOnTimeout(F,T,long,java.util.concurrent.TimeUnit))
728728

729729
Ensuring business logic won't execute in `CF`'s single-threaded `ScheduledThreadPoolExecutor`.
730730

731731
For more information, see:
732732

733733
- Problem demonstration [`DelayDysfunctionDemo.java`](https://github.com/foldright/cffu/blob/2.x-dev/cffu-core/src/test/java/io/foldright/demo/CfDelayDysfunctionDemo.java)
734-
- `cffu backport` method JavaDoc: [`CFU#orTimeout()`](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/CompletableFutureUtils.html#orTimeout(F,long,java.util.concurrent.TimeUnit))
735-
/ [`CFU#completeOnTimeout()`](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/CompletableFutureUtils.html#completeOnTimeout(F,T,long,java.util.concurrent.TimeUnit))
734+
- `cffu backport` method JavaDoc: [`CFU#orTimeout()`](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/CompletableFutureUtils.html#orTimeout(F,long,java.util.concurrent.TimeUnit))
735+
/ [`CFU#completeOnTimeout()`](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/CompletableFutureUtils.html#completeOnTimeout(F,T,long,java.util.concurrent.TimeUnit))
736736
- Article [Improper Use of `CompletableFuture` Timeout Functionality Causes Production Incidents](https://juejin.cn/post/7411686792342274089)
737737

738738
### 2.11 support for timeout-enabled `join` method
@@ -900,7 +900,7 @@ Compared to the above method groups (multiple `Action`s/multiple data), these me
900900
> In critical business logic, when using these methods, pay attention to
901901
> implementing good exception reporting logic, i.e. don't swallow exceptions:
902902
> - For implementation reference, see `cffu` implementation code, such as `CompletableFutureUtils.mSupplyFailFastAsync()`
903-
> - The `cffu` library provides support utility class [`SwallowedExceptionHandleUtils`](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/eh/SwallowedExceptionHandleUtils.html)
903+
> - The `cffu` library provides support utility class [`SwallowedExceptionHandleUtils`](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/eh/SwallowedExceptionHandleUtils.html)
904904
for implementing orchestration exception reporting
905905

906906
# 🔌 API Docs
@@ -920,18 +920,18 @@ Compared to the above method groups (multiple `Action`s/multiple data), these me
920920
<dependency>
921921
<groupId>io.foldright</groupId>
922922
<artifactId>cffu2</artifactId>
923-
<version>2.0.6</version>
923+
<version>2.0.7</version>
924924
</dependency>
925925
```
926926
- For `Gradle` projects:
927927

928928
Gradle Kotlin DSL
929929
```groovy
930-
implementation("io.foldright:cffu2:2.0.6")
930+
implementation("io.foldright:cffu2:2.0.7")
931931
```
932932
Gradle Groovy DSL
933933
```groovy
934-
implementation 'io.foldright:cffu2:2.0.6'
934+
implementation 'io.foldright:cffu2:2.0.7'
935935
```
936936
- [📌 `TransmittableThreadLocal(TTL)`](https://github.com/alibaba/transmittable-thread-local) [`cffu executor wrapper SPI` implementation](cffu-ttl-executor-wrapper):
937937
- For `Maven` projects:
@@ -940,19 +940,19 @@ Compared to the above method groups (multiple `Action`s/multiple data), these me
940940
<dependency>
941941
<groupId>io.foldright</groupId>
942942
<artifactId>cffu2-ttl-executor-wrapper</artifactId>
943-
<version>2.0.6</version>
943+
<version>2.0.7</version>
944944
<scope>runtime</scope>
945945
</dependency>
946946
```
947947
- For `Gradle` projects:
948948

949949
Gradle Kotlin DSL
950950
```groovy
951-
runtimeOnly("io.foldright:cffu2-ttl-executor-wrapper:2.0.6")
951+
runtimeOnly("io.foldright:cffu2-ttl-executor-wrapper:2.0.7")
952952
```
953953
Gradle Groovy DSL
954954
```groovy
955-
runtimeOnly 'io.foldright:cffu2-ttl-executor-wrapper:2.0.6'
955+
runtimeOnly 'io.foldright:cffu2-ttl-executor-wrapper:2.0.7'
956956
```
957957
- `cffu bom`:
958958
- For `Maven` projects:
@@ -961,7 +961,7 @@ Compared to the above method groups (multiple `Action`s/multiple data), these me
961961
<dependency>
962962
<groupId>io.foldright</groupId>
963963
<artifactId>cffu2-bom</artifactId>
964-
<version>2.0.6</version>
964+
<version>2.0.7</version>
965965
<type>pom</type>
966966
<scope>import</scope>
967967
</dependency>
@@ -970,11 +970,11 @@ Compared to the above method groups (multiple `Action`s/multiple data), these me
970970

971971
Gradle Kotlin DSL
972972
```groovy
973-
implementation(platform("io.foldright:cffu2-bom:2.0.6"))
973+
implementation(platform("io.foldright:cffu2-bom:2.0.7"))
974974
```
975975
Gradle Groovy DSL
976976
```groovy
977-
implementation platform('io.foldright:cffu2-bom:2.0.6')
977+
implementation platform('io.foldright:cffu2-bom:2.0.7')
978978
```
979979

980980
# 📚 More Resources

cffu-ttl-executor-wrapper/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ This dependency should only be used at `Runtime`.
2424
<groupId>io.foldright</groupId>
2525
<artifactId>cffu2-ttl-executor-wrapper</artifactId>
2626
<scope>runtime</scope>
27-
<version>2.0.6</version>
27+
<version>2.0.7</version>
2828
</dependency>
2929
```
3030
- For `Gradle` projects:
3131

3232
Gradle Kotlin DSL
3333
```groovy
34-
runtimeOnly("io.foldright:cffu2-ttl-executor-wrapper:2.0.6")
34+
runtimeOnly("io.foldright:cffu2-ttl-executor-wrapper:2.0.7")
3535
```
3636
Gradle Groovy DSL
3737
```groovy
38-
runtimeOnly 'io.foldright:cffu2-ttl-executor-wrapper:2.0.6'
38+
runtimeOnly 'io.foldright:cffu2-ttl-executor-wrapper:2.0.7'
3939
```
4040

4141
`cffu2-ttl-executor-wrapper` has published to maven central, find the latest version at

docs/README_CN.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
193193
2\) 如果不能修改使用`CompletableFuture`的代码(如在外部库中返回的`CF`
194194

195-
使用[`CffuFactory.toCffu(CompletionStage)`方法](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/CffuFactory.html#toCffu(java.util.concurrent.CompletionStage)),将`CompletableFuture``CompletionStage`转换成`Cffu`类型。
195+
使用[`CffuFactory.toCffu(CompletionStage)`方法](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/CffuFactory.html#toCffu(java.util.concurrent.CompletionStage)),将`CompletableFuture``CompletionStage`转换成`Cffu`类型。
196196

197197
### 1.3 库依赖(包含`CompletableFutureUtils`工具类)
198198

@@ -202,18 +202,18 @@
202202
<dependency>
203203
<groupId>io.foldright</groupId>
204204
<artifactId>cffu2</artifactId>
205-
<version>2.0.6</version>
205+
<version>2.0.7</version>
206206
</dependency>
207207
```
208208
- For `Gradle` projects:
209209

210210
Gradle Kotlin DSL
211211
```groovy
212-
implementation("io.foldright:cffu2:2.0.6")
212+
implementation("io.foldright:cffu2:2.0.7")
213213
```
214214
Gradle Groovy DSL
215215
```groovy
216-
implementation 'io.foldright:cffu2:2.0.6'
216+
implementation 'io.foldright:cffu2:2.0.7'
217217
```
218218

219219
## 2. `cffu`功能介绍
@@ -589,7 +589,7 @@ public class CfParallelDemo {
589589
类似的,`CompletableFuture#exceptionally`方法,也是处理了所有异常(`Throwable`);
590590
应该只处理当前业务自己清楚明确能恢复的具体异常,由外层处理其它的异常;避免掩盖Bug或是错误地处理了自己不能恢复的异常。
591591

592-
`cffu`提供了相应的[`catching*`方法](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/CompletableFutureUtils.html#catching(F,java.lang.Class,java.util.function.Function)),支持指定要处理异常类型;相比`CF#exceptionally`方法新加了一个异常类型参数,使用方式类似,不附代码示例。
592+
`cffu`提供了相应的[`catching*`方法](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/CompletableFutureUtils.html#catching(F,java.lang.Class,java.util.function.Function)),支持指定要处理异常类型;相比`CF#exceptionally`方法新加了一个异常类型参数,使用方式类似,不附代码示例。
593593

594594
### 2.9 `Backport`支持`Java 8`
595595

@@ -616,18 +616,18 @@ public class CfParallelDemo {
616616

617617
`cffu`库提供了超时执行安全的新实现方法:
618618

619-
- [`Cffu#orTimeout()`](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/BaseCffu.html#orTimeout(long,java.util.concurrent.TimeUnit))
620-
/ [`Cffu#completeOnTimeoutTimeout()`](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/BaseCffu.html#completeOnTimeout(java.lang.Object,long,java.util.concurrent.TimeUnit))
621-
- [`CFU#cffuOrTimeout()`](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/CompletableFutureUtils.html#cffuOrTimeout(F,long,java.util.concurrent.TimeUnit))
622-
/ [`CFU#cffuCompleteOnTimeout()`](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/CompletableFutureUtils.html#cffuCompleteOnTimeout(F,T,long,java.util.concurrent.TimeUnit))
619+
- [`Cffu#orTimeout()`](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/BaseCffu.html#orTimeout(long,java.util.concurrent.TimeUnit))
620+
/ [`Cffu#completeOnTimeoutTimeout()`](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/BaseCffu.html#completeOnTimeout(java.lang.Object,long,java.util.concurrent.TimeUnit))
621+
- [`CFU#cffuOrTimeout()`](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/CompletableFutureUtils.html#cffuOrTimeout(F,long,java.util.concurrent.TimeUnit))
622+
/ [`CFU#cffuCompleteOnTimeout()`](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/CompletableFutureUtils.html#cffuCompleteOnTimeout(F,T,long,java.util.concurrent.TimeUnit))
623623

624624
保证业务逻辑不会在`CF`的单线程`ScheduledThreadPoolExecutor`中执行。
625625

626626
更多说明参见:
627627

628628
- 演示问题的[`DelayDysfunctionDemo.java`](https://github.com/foldright/cffu/blob/2.x-dev/cffu-core/src/test/java/io/foldright/demo/CfDelayDysfunctionDemo.java)
629-
- `cffu backport`方法的`JavaDoc`[`CFU#orTimeout()`](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/CompletableFutureUtils.html#orTimeout(F,long,java.util.concurrent.TimeUnit))
630-
/ [`CFU#completeOnTimeout()`](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/CompletableFutureUtils.html#completeOnTimeout(F,T,long,java.util.concurrent.TimeUnit))
629+
- `cffu backport`方法的`JavaDoc`[`CFU#orTimeout()`](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/CompletableFutureUtils.html#orTimeout(F,long,java.util.concurrent.TimeUnit))
630+
/ [`CFU#completeOnTimeout()`](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/CompletableFutureUtils.html#completeOnTimeout(F,T,long,java.util.concurrent.TimeUnit))
631631
- 文章[`CompletableFuture`超时功能使用不当直接生产事故](https://juejin.cn/post/7411686792342274089)
632632

633633
### 2.11 支持超时的`join`方法
@@ -765,7 +765,7 @@ public class CfParallelDemo {
765765
>
766766
> 在关键业务逻辑中,使用这些方法注意实现好异常报告逻辑(即不要呑异常):
767767
> - 如何实现可以参考`cffu`实现代码,如`CompletableFutureUtils.mSupplyFailFastAsync()`
768-
> - `cffu`库提供了实现编排异常报告的支持工具类[`SwallowedExceptionHandleUtils`](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/eh/SwallowedExceptionHandleUtils.html)
768+
> - `cffu`库提供了实现编排异常报告的支持工具类[`SwallowedExceptionHandleUtils`](https://foldright.io/api-docs/cffu2/2.0.7/io/foldright/cffu2/eh/SwallowedExceptionHandleUtils.html)
769769
770770
# 🔌 API Docs
771771

@@ -782,18 +782,18 @@ public class CfParallelDemo {
782782
<dependency>
783783
<groupId>io.foldright</groupId>
784784
<artifactId>cffu2</artifactId>
785-
<version>2.0.6</version>
785+
<version>2.0.7</version>
786786
</dependency>
787787
```
788788
- For `Gradle` projects:
789789

790790
Gradle Kotlin DSL
791791
```groovy
792-
implementation("io.foldright:cffu2:2.0.6")
792+
implementation("io.foldright:cffu2:2.0.7")
793793
```
794794
Gradle Groovy DSL
795795
```groovy
796-
implementation 'io.foldright:cffu2:2.0.6'
796+
implementation 'io.foldright:cffu2:2.0.7'
797797
```
798798
- [📌 `TransmittableThreadLocal(TTL)`](https://github.com/alibaba/transmittable-thread-local)的[`cffu executor wrapper SPI`实现](../cffu-ttl-executor-wrapper):
799799
- For `Maven` projects:
@@ -802,19 +802,19 @@ public class CfParallelDemo {
802802
<dependency>
803803
<groupId>io.foldright</groupId>
804804
<artifactId>cffu2-ttl-executor-wrapper</artifactId>
805-
<version>2.0.6</version>
805+
<version>2.0.7</version>
806806
<scope>runtime</scope>
807807
</dependency>
808808
```
809809
- For `Gradle` projects:
810810

811811
Gradle Kotlin DSL
812812
```groovy
813-
runtimeOnly("io.foldright:cffu2-ttl-executor-wrapper:2.0.6")
813+
runtimeOnly("io.foldright:cffu2-ttl-executor-wrapper:2.0.7")
814814
```
815815
Gradle Groovy DSL
816816
```groovy
817-
runtimeOnly 'io.foldright:cffu2-ttl-executor-wrapper:2.0.6'
817+
runtimeOnly 'io.foldright:cffu2-ttl-executor-wrapper:2.0.7'
818818
```
819819
- `cffu bom`:
820820
- For `Maven` projects:
@@ -823,7 +823,7 @@ public class CfParallelDemo {
823823
<dependency>
824824
<groupId>io.foldright</groupId>
825825
<artifactId>cffu2-bom</artifactId>
826-
<version>2.0.6</version>
826+
<version>2.0.7</version>
827827
<type>pom</type>
828828
<scope>import</scope>
829829
</dependency>
@@ -832,11 +832,11 @@ public class CfParallelDemo {
832832

833833
Gradle Kotlin DSL
834834
```groovy
835-
implementation(platform("io.foldright:cffu2-bom:2.0.6"))
835+
implementation(platform("io.foldright:cffu2-bom:2.0.7"))
836836
```
837837
Gradle Groovy DSL
838838
```groovy
839-
implementation platform('io.foldright:cffu2-bom:2.0.6')
839+
implementation platform('io.foldright:cffu2-bom:2.0.7')
840840
```
841841

842842
# 📚 更多资料

0 commit comments

Comments
 (0)