Skip to content

Commit 5796e19

Browse files
committed
Work on iluwatar#403, updated diagram and finishing touches
1 parent 483c61a commit 5796e19

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed

promise/etc/promise.png

3.4 KB
Loading

promise/etc/promise.ucls

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</class>
3232
<interface id="4" language="java" name="java.util.concurrent.Executor" project="async-method-invocation"
3333
file="/usr/lib/java/jdk1.8.0_45/jre/lib/rt.jar" binary="true" corner="BOTTOM_RIGHT">
34-
<position height="-1" width="-1" x="834" y="573"/>
34+
<position height="-1" width="-1" x="798" y="541"/>
3535
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
3636
sort-features="false" accessors="true" visibility="true">
3737
<attributes public="true" package="true" protected="true" private="true" static="true"/>
@@ -40,7 +40,7 @@
4040
</interface>
4141
<interface id="5" language="java" name="java.util.concurrent.Callable" project="async-method-invocation"
4242
file="/usr/lib/java/jdk1.8.0_45/jre/lib/rt.jar" binary="true" corner="BOTTOM_RIGHT">
43-
<position height="-1" width="-1" x="825" y="433"/>
43+
<position height="-1" width="-1" x="847" y="345"/>
4444
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
4545
sort-features="false" accessors="true" visibility="true">
4646
<attributes public="true" package="true" protected="true" private="true" static="true"/>
@@ -49,7 +49,7 @@
4949
</interface>
5050
<interface id="6" language="java" name="java.util.function.Consumer" project="async-method-invocation"
5151
file="/usr/lib/java/jdk1.8.0_45/jre/lib/rt.jar" binary="true" corner="BOTTOM_RIGHT">
52-
<position height="-1" width="-1" x="162" y="437"/>
52+
<position height="-1" width="-1" x="158" y="336"/>
5353
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
5454
sort-features="false" accessors="true" visibility="true">
5555
<attributes public="true" package="true" protected="true" private="true" static="true"/>
@@ -58,7 +58,7 @@
5858
</interface>
5959
<interface id="7" language="java" name="java.util.function.Function" project="async-method-invocation"
6060
file="/usr/lib/java/jdk1.8.0_45/jre/lib/rt.jar" binary="true" corner="BOTTOM_RIGHT">
61-
<position height="-1" width="-1" x="168" y="591"/>
61+
<position height="-1" width="-1" x="166" y="546"/>
6262
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
6363
sort-features="false" accessors="true" visibility="true">
6464
<attributes public="true" package="true" protected="true" private="true" static="true"/>
@@ -67,41 +67,41 @@
6767
</interface>
6868
<class id="8" language="java" name="com.iluwatar.promise.App" project="promise"
6969
file="/promise/src/main/java/com/iluwatar/promise/App.java" binary="false" corner="BOTTOM_RIGHT">
70-
<position height="-1" width="-1" x="822" y="251"/>
70+
<position height="-1" width="-1" x="801" y="189"/>
7171
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
7272
sort-features="false" accessors="true" visibility="true">
7373
<attributes public="true" package="true" protected="true" private="false" static="true"/>
7474
<operations public="true" package="true" protected="true" private="false" static="true"/>
7575
</display>
7676
</class>
77-
<realization id="9">
78-
<end type="SOURCE" refId="3"/>
79-
<end type="TARGET" refId="2"/>
80-
</realization>
81-
<dependency id="10">
82-
<end type="SOURCE" refId="1"/>
83-
<end type="TARGET" refId="6"/>
84-
</dependency>
85-
<dependency id="11">
77+
<dependency id="9">
8678
<end type="SOURCE" refId="1"/>
8779
<end type="TARGET" refId="5"/>
8880
</dependency>
89-
<dependency id="12">
81+
<dependency id="10">
9082
<end type="SOURCE" refId="8"/>
9183
<end type="TARGET" refId="1"/>
9284
</dependency>
93-
<dependency id="13">
85+
<dependency id="11">
9486
<end type="SOURCE" refId="1"/>
95-
<end type="TARGET" refId="7"/>
87+
<end type="TARGET" refId="6"/>
9688
</dependency>
97-
<generalization id="14">
89+
<generalization id="12">
9890
<end type="SOURCE" refId="1"/>
9991
<end type="TARGET" refId="3"/>
10092
</generalization>
101-
<dependency id="15">
93+
<dependency id="13">
10294
<end type="SOURCE" refId="1"/>
10395
<end type="TARGET" refId="4"/>
10496
</dependency>
97+
<dependency id="14">
98+
<end type="SOURCE" refId="1"/>
99+
<end type="TARGET" refId="7"/>
100+
</dependency>
101+
<realization id="15">
102+
<end type="SOURCE" refId="3"/>
103+
<end type="TARGET" refId="2"/>
104+
</realization>
105105
<classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
106106
sort-features="false" accessors="true" visibility="true">
107107
<attributes public="true" package="true" protected="true" private="true" static="true"/>

promise/src/main/java/com/iluwatar/promise/App.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,12 @@
6161
public class App {
6262

6363
private static final String DEFAULT_URL = "https://raw.githubusercontent.com/iluwatar/java-design-patterns/Promise/promise/README.md";
64-
private ExecutorService executor;
65-
private CountDownLatch stopLatch = new CountDownLatch(2);
64+
private final ExecutorService executor;
65+
private final CountDownLatch stopLatch;
6666

6767
private App() {
6868
executor = Executors.newFixedThreadPool(2);
69+
stopLatch = new CountDownLatch(2);
6970
}
7071

7172
/**

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy