X Tutup
Skip to content

Commit 18618df

Browse files
committed
iluwatar#68 Added class diagram and referenced it from the README.md
1 parent a8b7dd5 commit 18618df

File tree

3 files changed

+87
-0
lines changed

3 files changed

+87
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,8 @@ validation and for building to order
627627
## <a name="async-method-invocation">Async Method Invocation</a> [&#8593;](#list-of-design-patterns)
628628
**Intent:** Asynchronous method invocation is pattern where the calling thread is not blocked while waiting results of tasks. The pattern provides parallel processing of multiple independent tasks and retrieving the results via callbacks or waiting until everything is done.
629629

630+
![alt text](https://github.com/iluwatar/java-design-patterns/blob/master/async-method-invocation/etc/async-method-invocation.png "Async Method Invocation")
631+
630632
**Applicability:** Use async method invocation pattern when
631633
* You have multiple independent tasks that can run in parallel
632634
* You need to improve performance of running a group of sequential tasks
36.1 KB
Loading
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<class-diagram version="1.1.8" icons="true" automaticImage="PNG" always-add-relationships="false" generalizations="true"
3+
realizations="true" associations="true" dependencies="false" nesting-relationships="true">
4+
<interface id="1" language="java" name="com.iluwatar.async.method.invocation.AsyncExecutor"
5+
project="async-method-invocation"
6+
file="/async-method-invocation/src/main/java/com/iluwatar/async/method/invocation/AsyncExecutor.java" binary="false"
7+
corner="BOTTOM_RIGHT">
8+
<position height="-1" width="-1" x="220" y="404"/>
9+
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
10+
sort-features="false" accessors="true" visibility="true">
11+
<attributes public="true" package="true" protected="true" private="true" static="true"/>
12+
<operations public="true" package="true" protected="true" private="true" static="true"/>
13+
</display>
14+
</interface>
15+
<class id="2" language="java" name="com.iluwatar.async.method.invocation.ThreadAsyncExecutor.CompletableResult"
16+
project="async-method-invocation"
17+
file="/async-method-invocation/src/main/java/com/iluwatar/async/method/invocation/ThreadAsyncExecutor.java"
18+
binary="false" corner="BOTTOM_RIGHT">
19+
<position height="-1" width="-1" x="980" y="173"/>
20+
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
21+
sort-features="false" accessors="true" visibility="true">
22+
<attributes public="true" package="true" protected="true" private="true" static="true"/>
23+
<operations public="true" package="true" protected="true" private="true" static="true"/>
24+
</display>
25+
</class>
26+
<interface id="3" language="java" name="com.iluwatar.async.method.invocation.AsyncResult"
27+
project="async-method-invocation"
28+
file="/async-method-invocation/src/main/java/com/iluwatar/async/method/invocation/AsyncResult.java" binary="false"
29+
corner="BOTTOM_RIGHT">
30+
<position height="-1" width="-1" x="580" y="443"/>
31+
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
32+
sort-features="false" accessors="true" visibility="true">
33+
<attributes public="true" package="true" protected="true" private="true" static="true"/>
34+
<operations public="true" package="true" protected="true" private="true" static="true"/>
35+
</display>
36+
</interface>
37+
<interface id="4" language="java" name="com.iluwatar.async.method.invocation.AsyncCallback"
38+
project="async-method-invocation"
39+
file="/async-method-invocation/src/main/java/com/iluwatar/async/method/invocation/AsyncCallback.java" binary="false"
40+
corner="BOTTOM_RIGHT">
41+
<position height="-1" width="-1" x="156" y="173"/>
42+
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
43+
sort-features="false" accessors="true" visibility="true">
44+
<attributes public="true" package="true" protected="true" private="true" static="true"/>
45+
<operations public="true" package="true" protected="true" private="true" static="true"/>
46+
</display>
47+
</interface>
48+
<class id="5" language="java" name="com.iluwatar.async.method.invocation.ThreadAsyncExecutor"
49+
project="async-method-invocation"
50+
file="/async-method-invocation/src/main/java/com/iluwatar/async/method/invocation/ThreadAsyncExecutor.java"
51+
binary="false" corner="BOTTOM_RIGHT">
52+
<position height="-1" width="-1" x="580" y="173"/>
53+
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
54+
sort-features="false" accessors="true" visibility="true">
55+
<attributes public="true" package="true" protected="true" private="true" static="true"/>
56+
<operations public="true" package="true" protected="true" private="true" static="true"/>
57+
</display>
58+
</class>
59+
<dependency id="6">
60+
<end type="SOURCE" refId="5"/>
61+
<end type="TARGET" refId="4"/>
62+
</dependency>
63+
<dependency id="7">
64+
<end type="SOURCE" refId="5"/>
65+
<end type="TARGET" refId="3"/>
66+
</dependency>
67+
<nesting id="8">
68+
<end type="SOURCE" refId="5"/>
69+
<end type="TARGET" refId="2"/>
70+
</nesting>
71+
<realization id="9">
72+
<end type="SOURCE" refId="5"/>
73+
<end type="TARGET" refId="1"/>
74+
</realization>
75+
<realization id="10">
76+
<end type="SOURCE" refId="2"/>
77+
<end type="TARGET" refId="3"/>
78+
</realization>
79+
<classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
80+
sort-features="false" accessors="true" visibility="true">
81+
<attributes public="true" package="true" protected="true" private="true" static="true"/>
82+
<operations public="true" package="true" protected="true" private="true" static="true"/>
83+
</classifier-display>
84+
<association-display labels="true" multiplicity="true"/>
85+
</class-diagram>

0 commit comments

Comments
 (0)
X Tutup