Work on #403, updated diagram and finishing touches

This commit is contained in:
Narendra Pathai 2016-08-29 11:50:33 +05:30
parent 483c61a82a
commit 5796e1967f
3 changed files with 22 additions and 21 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -31,7 +31,7 @@
</class> </class>
<interface id="4" language="java" name="java.util.concurrent.Executor" project="async-method-invocation" <interface id="4" language="java" name="java.util.concurrent.Executor" project="async-method-invocation"
file="/usr/lib/java/jdk1.8.0_45/jre/lib/rt.jar" binary="true" corner="BOTTOM_RIGHT"> file="/usr/lib/java/jdk1.8.0_45/jre/lib/rt.jar" binary="true" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="834" y="573"/> <position height="-1" width="-1" x="798" y="541"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true"> sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/> <attributes public="true" package="true" protected="true" private="true" static="true"/>
@ -40,7 +40,7 @@
</interface> </interface>
<interface id="5" language="java" name="java.util.concurrent.Callable" project="async-method-invocation" <interface id="5" language="java" name="java.util.concurrent.Callable" project="async-method-invocation"
file="/usr/lib/java/jdk1.8.0_45/jre/lib/rt.jar" binary="true" corner="BOTTOM_RIGHT"> file="/usr/lib/java/jdk1.8.0_45/jre/lib/rt.jar" binary="true" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="825" y="433"/> <position height="-1" width="-1" x="847" y="345"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true"> sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/> <attributes public="true" package="true" protected="true" private="true" static="true"/>
@ -49,7 +49,7 @@
</interface> </interface>
<interface id="6" language="java" name="java.util.function.Consumer" project="async-method-invocation" <interface id="6" language="java" name="java.util.function.Consumer" project="async-method-invocation"
file="/usr/lib/java/jdk1.8.0_45/jre/lib/rt.jar" binary="true" corner="BOTTOM_RIGHT"> file="/usr/lib/java/jdk1.8.0_45/jre/lib/rt.jar" binary="true" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="162" y="437"/> <position height="-1" width="-1" x="158" y="336"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true"> sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/> <attributes public="true" package="true" protected="true" private="true" static="true"/>
@ -58,7 +58,7 @@
</interface> </interface>
<interface id="7" language="java" name="java.util.function.Function" project="async-method-invocation" <interface id="7" language="java" name="java.util.function.Function" project="async-method-invocation"
file="/usr/lib/java/jdk1.8.0_45/jre/lib/rt.jar" binary="true" corner="BOTTOM_RIGHT"> file="/usr/lib/java/jdk1.8.0_45/jre/lib/rt.jar" binary="true" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="168" y="591"/> <position height="-1" width="-1" x="166" y="546"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true"> sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/> <attributes public="true" package="true" protected="true" private="true" static="true"/>
@ -67,41 +67,41 @@
</interface> </interface>
<class id="8" language="java" name="com.iluwatar.promise.App" project="promise" <class id="8" language="java" name="com.iluwatar.promise.App" project="promise"
file="/promise/src/main/java/com/iluwatar/promise/App.java" binary="false" corner="BOTTOM_RIGHT"> file="/promise/src/main/java/com/iluwatar/promise/App.java" binary="false" corner="BOTTOM_RIGHT">
<position height="-1" width="-1" x="822" y="251"/> <position height="-1" width="-1" x="801" y="189"/>
<display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" <display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true"> sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="false" static="true"/> <attributes public="true" package="true" protected="true" private="false" static="true"/>
<operations public="true" package="true" protected="true" private="false" static="true"/> <operations public="true" package="true" protected="true" private="false" static="true"/>
</display> </display>
</class> </class>
<realization id="9"> <dependency id="9">
<end type="SOURCE" refId="3"/>
<end type="TARGET" refId="2"/>
</realization>
<dependency id="10">
<end type="SOURCE" refId="1"/>
<end type="TARGET" refId="6"/>
</dependency>
<dependency id="11">
<end type="SOURCE" refId="1"/> <end type="SOURCE" refId="1"/>
<end type="TARGET" refId="5"/> <end type="TARGET" refId="5"/>
</dependency> </dependency>
<dependency id="12"> <dependency id="10">
<end type="SOURCE" refId="8"/> <end type="SOURCE" refId="8"/>
<end type="TARGET" refId="1"/> <end type="TARGET" refId="1"/>
</dependency> </dependency>
<dependency id="13"> <dependency id="11">
<end type="SOURCE" refId="1"/> <end type="SOURCE" refId="1"/>
<end type="TARGET" refId="7"/> <end type="TARGET" refId="6"/>
</dependency> </dependency>
<generalization id="14"> <generalization id="12">
<end type="SOURCE" refId="1"/> <end type="SOURCE" refId="1"/>
<end type="TARGET" refId="3"/> <end type="TARGET" refId="3"/>
</generalization> </generalization>
<dependency id="15"> <dependency id="13">
<end type="SOURCE" refId="1"/> <end type="SOURCE" refId="1"/>
<end type="TARGET" refId="4"/> <end type="TARGET" refId="4"/>
</dependency> </dependency>
<dependency id="14">
<end type="SOURCE" refId="1"/>
<end type="TARGET" refId="7"/>
</dependency>
<realization id="15">
<end type="SOURCE" refId="3"/>
<end type="TARGET" refId="2"/>
</realization>
<classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true" <classifier-display autosize="true" stereotype="true" package="true" initial-value="false" signature="true"
sort-features="false" accessors="true" visibility="true"> sort-features="false" accessors="true" visibility="true">
<attributes public="true" package="true" protected="true" private="true" static="true"/> <attributes public="true" package="true" protected="true" private="true" static="true"/>

View File

@ -61,11 +61,12 @@ import java.util.concurrent.Executors;
public class App { public class App {
private static final String DEFAULT_URL = "https://raw.githubusercontent.com/iluwatar/java-design-patterns/Promise/promise/README.md"; private static final String DEFAULT_URL = "https://raw.githubusercontent.com/iluwatar/java-design-patterns/Promise/promise/README.md";
private ExecutorService executor; private final ExecutorService executor;
private CountDownLatch stopLatch = new CountDownLatch(2); private final CountDownLatch stopLatch;
private App() { private App() {
executor = Executors.newFixedThreadPool(2); executor = Executors.newFixedThreadPool(2);
stopLatch = new CountDownLatch(2);
} }
/** /**