Skip to content

Commit 6d3a690

Browse files
committed
docs: replace "aka" with "i.e." for clarity and consistency 📚
1 parent 6b60770 commit 6d3a690

File tree

10 files changed

+66
-67
lines changed

10 files changed

+66
-67
lines changed

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ Welcome 👏💖
8282
- Such as methods `allResultsFailFastOf` / `mSupplyFailFastAsync` / `thenMApplyMostSuccessAsync`
8383
- Support for directly running multiple `Action`s instead of wrapping them into `CompletableFuture`s first
8484
- Such as methods `mSupplyAsync` / `mRunFailFastAsync` / `thenMApplyAllSuccessAsync`
85-
- Aka. multiple instruction, single data (`MISD`) style processing
85+
- i.e. multiple instruction, single data (`MISD`) style processing
8686
- Support for async parallel processing of collection data,
8787
instead of wrapping data with actions into `CompletableFuture`s first
8888
- Such as methods `CfParallelUtils#parApplyFailFastAsync` / `CfParallelUtils#thenParAcceptAnySuccessAsync`
89-
- Aka. single instruction, multiple data (`SIMD`) style processing
89+
- i.e. single instruction, multiple data (`SIMD`) style processing
9090
- Support for inputting collections of `CF`s / `Action`s instead of converting them to array first
9191
- Such as methods `CfIterableUtils#allResultsFailFastOf` /
9292
`CfIterableUtils#mSupplyFailFastAsync` / `CfIterableUtils#thenMApplyMostSuccessAsync`
@@ -415,7 +415,7 @@ public class AnySuccessDemo {
415415
416416
### 2.4 support for setting the default business thread pool
417417

418-
The default thread pool used by `CompletableFuture` async execution (aka. `*Async` methods)
418+
The default thread pool used by `CompletableFuture` async execution (i.e. `*Async` methods)
419419
is `ForkJoinPool.commonPool()`; using this default thread pool in business is very dangerous❗
420420

421421
- `ForkJoinPool.commonPool()` has about as many threads as CPUs, suitable for executing CPU-intensive tasks;
@@ -808,29 +808,29 @@ Supports 3-parameter types for representing multiple `Action`s: varargs array, c
808808

809809
- Multiple parameter varargs input, input type is **array type**
810810
- Corresponding method groups:
811-
- `CompletableFutureUtils.M*` methods, aka. `Multi-Actions(M*) Methods`
812-
- `CompletableFutureUtils.thenM*` methods, aka. `Then-Multi-Actions(thenM*) Methods`
811+
- `CompletableFutureUtils.M*` methods, i.e. `Multi-Actions(M*) Methods`
812+
- `CompletableFutureUtils.thenM*` methods, i.e. `Then-Multi-Actions(thenM*) Methods`
813813
- Collection parameter input, input type is **`Iterable`**
814814
- Corresponding method groups:
815-
- `CfIterableUtils.M*`, aka. `Multi-Actions(M*) Methods`
816-
- `CfIterableUtils.thenM*`, aka. `Then-Multi-Actions(thenM*) Methods`
815+
- `CfIterableUtils.M*`, i.e. `Multi-Actions(M*) Methods`
816+
- `CfIterableUtils.thenM*`, i.e. `Then-Multi-Actions(thenM*) Methods`
817817
- The method names and functionality of this group are the same as the "multiple parameter varargs input" above,
818818
but the parameter types for multiple `Action` inputs are different (`Iterable` vs. array)
819819
- Multiple `Action` inputs with different generic parameter types, input type is **`Tuple`**
820820
- Corresponding method groups:
821-
- `CfTupleUtils.MTuple*`, aka. `Multi-Actions-Tuple(MTuple*) Methods`
822-
- `CfTupleUtils.thenMTuple*`, aka. `Then-Multi-Actions-Tuple(thenMTuple*) Methods`
821+
- `CfTupleUtils.MTuple*`, i.e. `Multi-Actions-Tuple(MTuple*) Methods`
822+
- `CfTupleUtils.thenMTuple*`, i.e. `Then-Multi-Actions-Tuple(thenMTuple*) Methods`
823823

824-
Multiple `Action`s perform asynchronous parallel processing on (single same) data, aka. Multiple Instruction, Single Data (`MISD`).
824+
Multiple `Action`s perform asynchronous parallel processing on (single same) data, i.e. Multiple Instruction, Single Data (`MISD`).
825825

826826
2\) **Multiple Data Inputs**
827827

828-
Asynchronous parallel processing of multiple data through a single same `Action`, aka. Single Instruction, Multiple Data (`SIMD`).
828+
Asynchronous parallel processing of multiple data through a single same `Action`, i.e. Single Instruction, Multiple Data (`SIMD`).
829829

830830
Corresponding method groups:
831831

832-
- `CfParallelUtils.Par*` methods, aka. `Multi-Data(Par*) Methods`
833-
- `CfParallelUtils.thenPar*` methods, aka. `Then-Multi-Data(thenPar*) Methods`
832+
- `CfParallelUtils.Par*` methods, i.e. `Multi-Data(Par*) Methods`
833+
- `CfParallelUtils.thenPar*` methods, i.e. `Then-Multi-Data(thenPar*) Methods`
834834

835835
In business logic, collections should be used to hold multiple data rather than arrays;
836836
if business logic holds multiple data in array type, it can be easily converted to the collection type,
@@ -860,19 +860,19 @@ Including `Action`s in the form of `Lambda` literal.
860860

861861
- When the number of `Action`s is fixed/known,
862862
use "multiple parameter varargs `Action`" methods, corresponding method groups:
863-
- `CompletableFutureUtils.M*` methods, aka. `Multi-Actions(M*) Methods`
864-
- `CompletableFutureUtils.thenM*` methods, aka. `Then-Multi-Actions(thenM*) Methods`
863+
- `CompletableFutureUtils.M*` methods, i.e. `Multi-Actions(M*) Methods`
864+
- `CompletableFutureUtils.thenM*` methods, i.e. `Then-Multi-Actions(thenM*) Methods`
865865
- When the number of `Action`s is not fixed,
866866
use "`Action` collection" methods, corresponding method groups:
867-
- `CfIterableUtils.M*`, aka. `Multi-Actions(M*) Methods`
868-
- `CfIterableUtils.thenM*`, aka. `Then-Multi-Actions(thenM*) Methods`
867+
- `CfIterableUtils.M*`, i.e. `Multi-Actions(M*) Methods`
868+
- `CfIterableUtils.thenM*`, i.e. `Then-Multi-Actions(thenM*) Methods`
869869

870870
2\) When business processing logic has multiple data for asynchronous parallel processing
871871

872872
Use "multiple data input" methods, corresponding method groups:
873873

874-
- `CfParallelUtils.Par*` methods, aka. `Multi-Data(Par*) Methods`
875-
- `CfParallelUtils.thenPar*` methods, aka. `Then-Multi-Data(thenPar*) Methods`
874+
- `CfParallelUtils.Par*` methods, i.e. `Multi-Data(Par*) Methods`
875+
- `CfParallelUtils.thenPar*` methods, i.e. `Then-Multi-Data(thenPar*) Methods`
876876

877877
3\) When business processing logic input only has multiple `CompletableFuture`s
878878

@@ -898,7 +898,7 @@ Compared to the above method groups (multiple `Action`s/multiple data), these me
898898
> should be treated as lower-level basic methods, used only when necessary.
899899
>
900900
> In critical business logic, when using these methods, pay attention to
901-
> implementing good exception reporting logic (aka. don't swallow exceptions):
901+
> implementing good exception reporting logic, i.e. don't swallow exceptions:
902902
> - For implementation reference, see `cffu` implementation code, such as `CompletableFutureUtils.mSupplyFailFastAsync()`
903903
> - The `cffu` library provides support utility class [`SwallowedExceptionHandleUtils`](https://foldright.io/api-docs/cffu2/2.0.6/io/foldright/cffu2/eh/SwallowedExceptionHandleUtils.html)
904904
for implementing orchestration exception reporting

cffu-core/src/main/java/io/foldright/cffu2/BaseCffu.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,8 +1296,8 @@ public final Cffu<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable a
12961296
* Otherwise, the returned Cffu contains the same result as this Cffu.
12971297
* <p>
12981298
* <strong>"The exception from this Cffu"</strong> means the cause of the {@link ExecutionException}
1299-
* thrown by {@code get()} or, if {@code get()} throws a different kind of exception, that exception itself;
1300-
* aka the exception is unwrapped by {@link CompletableFutureUtils#unwrapCfException(Throwable)}.
1299+
* thrown by {@code get()} or, if {@code get()} throws a different kind of exception, that exception itself,
1300+
* i.e. the exception is unwrapped by {@link CompletableFutureUtils#unwrapCfException(Throwable)}.
13011301
*
13021302
* @param exceptionType the exception type that triggers use of {@code fallback}. The exception type is matched
13031303
* against the exception from this Cffu. To avoid hiding bugs and other unrecoverable errors,
@@ -1317,8 +1317,8 @@ public final <X extends Throwable> F catching(Class<X> exceptionType, Function<?
13171317
* Otherwise, the returned Cffu contains the same result as this Cffu.
13181318
* <p>
13191319
* <strong>"The exception from this Cffu"</strong> means the cause of the {@link ExecutionException}
1320-
* thrown by {@code get()} or, if {@code get()} throws a different kind of exception, that exception itself;
1321-
* aka the exception is unwrapped by {@link CompletableFutureUtils#unwrapCfException(Throwable)}.
1320+
* thrown by {@code get()} or, if {@code get()} throws a different kind of exception, that exception itself,
1321+
* i.e. the exception is unwrapped by {@link CompletableFutureUtils#unwrapCfException(Throwable)}.
13221322
*
13231323
* @param exceptionType the exception type that triggers use of {@code fallback}. The exception type is matched
13241324
* against the exception from this Cffu. To avoid hiding bugs and other unrecoverable errors,
@@ -1339,8 +1339,8 @@ public final <X extends Throwable> F catchingAsync(
13391339
* Otherwise, the returned Cffu contains the same result as this Cffu.
13401340
* <p>
13411341
* <strong>"The exception from this Cffu"</strong> means the cause of the {@link ExecutionException}
1342-
* thrown by {@code get()} or, if {@code get()} throws a different kind of exception, that exception itself;
1343-
* aka the exception is unwrapped by {@link CompletableFutureUtils#unwrapCfException(Throwable)}.
1342+
* thrown by {@code get()} or, if {@code get()} throws a different kind of exception, that exception itself,
1343+
* i.e. the exception is unwrapped by {@link CompletableFutureUtils#unwrapCfException(Throwable)}.
13441344
*
13451345
* @param exceptionType the exception type that triggers use of {@code fallback}. The exception type is matched
13461346
* against the exception from this Cffu. To avoid hiding bugs and other unrecoverable errors,
@@ -1458,8 +1458,8 @@ public final F orTimeout(long timeout, TimeUnit unit) {
14581458
* instead of this method. Using this method is appropriate only when:
14591459
* <ul>
14601460
* <li>the returned Cffu is only read explicitly(e.g. by get/join/resultNow methods),
1461-
* <li>and/or all subsequent actions of dependent Cffus/CompletableFutures are guaranteed to execute asynchronously
1462-
* (i.e., the dependent Cffus/CompletableFutures are created using async methods).
1461+
* <li>and/or all subsequent actions of dependent Cffus/CompletableFutures are guaranteed to execute asynchronously,
1462+
* i.e. the dependent Cffus/CompletableFutures are created using async methods.
14631463
* </ul> In these cases, using this unsafe method avoids an unnecessary thread switching when timeout occurs; However,
14641464
* these conditions are difficult to guarantee in practice, especially when the returned Cffu is used by others' codes.
14651465
* <p>
@@ -1519,8 +1519,8 @@ public final F completeOnTimeout(@Nullable T value, long timeout, TimeUnit unit)
15191519
* completeOnTimeout} instead of this method. Using this method is appropriate only when:
15201520
* <ul>
15211521
* <li>the returned Cffu is only read explicitly(e.g. by get/join/resultNow methods),
1522-
* <li>and/or all subsequent actions of dependent Cffus/CompletableFutures are guaranteed to execute asynchronously
1523-
* (i.e., the dependent Cffus/CompletableFutures are created using async methods).
1522+
* <li>and/or all subsequent actions of dependent Cffus/CompletableFutures are guaranteed to execute asynchronously,
1523+
* i.e. the dependent Cffus/CompletableFutures are created using async methods.
15241524
* </ul> In these cases, using this unsafe method avoids an unnecessary thread switching when timeout occurs; However,
15251525
* these conditions are difficult to guarantee in practice, especially when the returned Cffu is used by others' codes.
15261526
*
@@ -1616,8 +1616,8 @@ public final <U> Cffu<U> thenComposeAsync(Function<? super T, ? extends Completi
16161616
* is composed using the results of the supplied function applied to the exception from this Cffu.
16171617
* <p>
16181618
* <strong>"The exception from this Cffu"</strong> means the cause of the {@link ExecutionException}
1619-
* thrown by {@code get()} or, if {@code get()} throws a different kind of exception, that exception itself;
1620-
* aka the exception is unwrapped by {@link CompletableFutureUtils#unwrapCfException(Throwable)}.
1619+
* thrown by {@code get()} or, if {@code get()} throws a different kind of exception, that exception itself,
1620+
* i.e. the exception is unwrapped by {@link CompletableFutureUtils#unwrapCfException(Throwable)}.
16211621
*
16221622
* @param exceptionType the exception type that triggers use of {@code fallback}. The exception type is matched
16231623
* against the exception from this Cffu. To avoid hiding bugs and other unrecoverable errors,
@@ -1637,8 +1637,8 @@ public final <X extends Throwable> F catchingCompose(
16371637
* the results of the supplied function applied to the exception from this Cffu using {@link #defaultExecutor()}.
16381638
* <p>
16391639
* <strong>"The exception from this Cffu"</strong> means the cause of the {@link ExecutionException}
1640-
* thrown by {@code get()} or, if {@code get()} throws a different kind of exception, that exception itself;
1641-
* aka the exception is unwrapped by {@link CompletableFutureUtils#unwrapCfException(Throwable)}.
1640+
* thrown by {@code get()} or, if {@code get()} throws a different kind of exception, that exception itself,
1641+
* i.e. the exception is unwrapped by {@link CompletableFutureUtils#unwrapCfException(Throwable)}.
16421642
*
16431643
* @param exceptionType the exception type that triggers use of {@code fallback}. The exception type is matched
16441644
* against the exception from this Cffu. To avoid hiding bugs and other unrecoverable errors,
@@ -1658,8 +1658,8 @@ public final <X extends Throwable> F catchingComposeAsync(
16581658
* the results of the supplied function applied to the exception from this Cffu, using the supplied Executor.
16591659
* <p>
16601660
* <strong>"The exception from this Cffu"</strong> means the cause of the {@link ExecutionException}
1661-
* thrown by {@code get()} or, if {@code get()} throws a different kind of exception, that exception itself;
1662-
* aka the exception is unwrapped by {@link CompletableFutureUtils#unwrapCfException(Throwable)}.
1661+
* thrown by {@code get()} or, if {@code get()} throws a different kind of exception, that exception itself,
1662+
* i.e. the exception is unwrapped by {@link CompletableFutureUtils#unwrapCfException(Throwable)}.
16631663
*
16641664
* @param exceptionType the exception type that triggers use of {@code fallback}. The exception type is matched
16651665
* against the exception from this Cffu. To avoid hiding bugs and other unrecoverable errors,
@@ -2471,7 +2471,7 @@ public final boolean isMinimalStage() {
24712471

24722472
/**
24732473
* Returns the estimated number of CompletableFuture(including Cffu wrapper)
2474-
* whose completions are awaiting completion of this Cffu(aka its underlying CompletableFuture).
2474+
* whose completions are awaiting completion of this Cffu, i.e. its underlying CompletableFuture.
24752475
* This method is designed for use in monitoring system state, not for synchronization control.
24762476
*
24772477
* @return the estimated number of dependent CompletableFutures(including Cffu wrapper)
@@ -2580,7 +2580,7 @@ public final String toString() {
25802580
/**
25812581
* Returns a {@link CffuFactory.IterableOps} instance to access the {@link Iterable}-based variants
25822582
* (including {@link Collection}, {@link List}, etc.) of same-named varargs methods from {@link Cffu}.
2583-
* These methods handle multiple actions and Futures with the same type (aka. homogeneous).
2583+
* These methods handle multiple actions and Futures with the same type, i.e. homogeneous.
25842584
*
25852585
* @see CfIterableUtils
25862586
*/
@@ -2602,7 +2602,7 @@ public final TupleOps tupleOps() {
26022602
/**
26032603
* The {@link Iterable}-based variants (including {@link Collection}, {@link List}, etc.) of
26042604
* same-named varargs methods from {@link Cffu}.
2605-
* These methods handle multiple actions and Futures with the same type (aka. homogeneous).
2605+
* These methods handle multiple actions and Futures with the same type, i.e. homogeneous.
26062606
*/
26072607
public final class IterableOps {
26082608
////////////////////////////////////////////////////////////

cffu-core/src/main/java/io/foldright/cffu2/CfIterableUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
/**
2222
* This utility class provides {@link Iterable}-based variants (including {@link Collection}, {@link List}, etc.) of
2323
* same-named varargs methods from {@link CompletableFutureUtils}. These methods handle multiple actions
24-
* and CompletableFutures with the same type (aka. homogeneous).
24+
* and CompletableFutures with the same type, i.e. homogeneous.
2525
* <p>
2626
* While {@link CfTupleUtils} uses strongly typed tuples for handling different types of actions and
27-
* CompletableFutures (aka. heterogeneous), this class and {@link CompletableFutureUtils} work with homogeneous types,
27+
* CompletableFutures, i.e. heterogeneous, this class and {@link CompletableFutureUtils} work with homogeneous types,
2828
* offering a flexible approach for handling collections of actions and CompletableFutures of the same type.
2929
*
3030
* @author Eric Lin (linqinghua4 at gmail dot com)

cffu-core/src/main/java/io/foldright/cffu2/CffuFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ public final <T> MCffu<T, List<T>> allSuccessResultsOf(
464464

465465
/**
466466
* Returns a new Cffu that is completed normally with a list containing the successful results of
467-
* the given stages before the given timeout (aka as many results as possible in the given time);
467+
* the given stages before the given timeout, i.e. as many results as possible in the given time;
468468
* The list of results is in the <strong>same order</strong> as the input list, and if any of given stages
469469
* complete exceptionally or are incomplete, their corresponding positions will contain {@code valueIfNotSuccess}
470470
* (which is indistinguishable from the stage having a successful value of {@code valueIfNotSuccess}).
@@ -937,7 +937,7 @@ public boolean forbidObtrudeMethods() {
937937
/**
938938
* Returns a {@link IterableOps} instance to access the {@link Iterable}-based variants
939939
* (including {@link Collection}, {@link List}, etc.) of same-named varargs methods from {@link CffuFactory}.
940-
* These methods handle multiple actions and Futures with the same type (aka. homogeneous).
940+
* These methods handle multiple actions and Futures with the same type, aka. homogeneous.
941941
*
942942
* @see BaseCffu#iterableOps()
943943
* @see CfIterableUtils
@@ -970,7 +970,7 @@ public TupleOps tupleOps() {
970970
/**
971971
* The {@link Iterable}-based variants (including {@link Collection}, {@link List}, etc.) of
972972
* same-named varargs methods from {@link CffuFactory}.
973-
* These methods handle multiple actions and Futures with the same type (aka. homogeneous).
973+
* These methods handle multiple actions and Futures with the same type, aka. homogeneous.
974974
*/
975975
public final class IterableOps {
976976
////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)