Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
java镜像
Java Design Patterns
提交
5796e196
J
Java Design Patterns
项目概览
后端镜像
/
java镜像
/
Java Design Patterns
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
Java Design Patterns
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
5796e196
编写于
8月 29, 2016
作者:
N
Narendra Pathai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Work on #403, updated diagram and finishing touches
上级
483c61a8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
21 deletion
+22
-21
promise/etc/promise.png
promise/etc/promise.png
+0
-0
promise/etc/promise.ucls
promise/etc/promise.ucls
+19
-19
promise/src/main/java/com/iluwatar/promise/App.java
promise/src/main/java/com/iluwatar/promise/App.java
+3
-2
未找到文件。
promise/etc/promise.png
查看替换文件 @
483c61a8
浏览文件 @
5796e196
54.4 KB
|
W:
|
H:
57.8 KB
|
W:
|
H:
2-up
Swipe
Onion skin
promise/etc/promise.ucls
浏览文件 @
5796e196
...
...
@@ -31,7 +31,7 @@
</class>
<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"
>
<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"
sort-features=
"false"
accessors=
"true"
visibility=
"true"
>
<attributes
public=
"true"
package=
"true"
protected=
"true"
private=
"true"
static=
"true"
/>
...
...
@@ -40,7 +40,7 @@
</interface>
<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"
>
<position
height=
"-1"
width=
"-1"
x=
"8
25"
y=
"433
"
/>
<position
height=
"-1"
width=
"-1"
x=
"8
47"
y=
"345
"
/>
<display
autosize=
"true"
stereotype=
"true"
package=
"true"
initial-value=
"false"
signature=
"true"
sort-features=
"false"
accessors=
"true"
visibility=
"true"
>
<attributes
public=
"true"
package=
"true"
protected=
"true"
private=
"true"
static=
"true"
/>
...
...
@@ -49,7 +49,7 @@
</interface>
<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"
>
<position
height=
"-1"
width=
"-1"
x=
"1
62"
y=
"437
"
/>
<position
height=
"-1"
width=
"-1"
x=
"1
58"
y=
"336
"
/>
<display
autosize=
"true"
stereotype=
"true"
package=
"true"
initial-value=
"false"
signature=
"true"
sort-features=
"false"
accessors=
"true"
visibility=
"true"
>
<attributes
public=
"true"
package=
"true"
protected=
"true"
private=
"true"
static=
"true"
/>
...
...
@@ -58,7 +58,7 @@
</interface>
<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"
>
<position
height=
"-1"
width=
"-1"
x=
"16
8"
y=
"591
"
/>
<position
height=
"-1"
width=
"-1"
x=
"16
6"
y=
"546
"
/>
<display
autosize=
"true"
stereotype=
"true"
package=
"true"
initial-value=
"false"
signature=
"true"
sort-features=
"false"
accessors=
"true"
visibility=
"true"
>
<attributes
public=
"true"
package=
"true"
protected=
"true"
private=
"true"
static=
"true"
/>
...
...
@@ -67,41 +67,41 @@
</interface>
<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"
>
<position
height=
"-1"
width=
"-1"
x=
"8
22"
y=
"251
"
/>
<position
height=
"-1"
width=
"-1"
x=
"8
01"
y=
"189
"
/>
<display
autosize=
"true"
stereotype=
"true"
package=
"true"
initial-value=
"false"
signature=
"true"
sort-features=
"false"
accessors=
"true"
visibility=
"true"
>
<attributes
public=
"true"
package=
"true"
protected=
"true"
private=
"false"
static=
"true"
/>
<operations
public=
"true"
package=
"true"
protected=
"true"
private=
"false"
static=
"true"
/>
</display>
</class>
<realization
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"
>
<dependency
id=
"9"
>
<end
type=
"SOURCE"
refId=
"1"
/>
<end
type=
"TARGET"
refId=
"5"
/>
</dependency>
<dependency
id=
"1
2
"
>
<dependency
id=
"1
0
"
>
<end
type=
"SOURCE"
refId=
"8"
/>
<end
type=
"TARGET"
refId=
"1"
/>
</dependency>
<dependency
id=
"1
3
"
>
<dependency
id=
"1
1
"
>
<end
type=
"SOURCE"
refId=
"1"
/>
<end
type=
"TARGET"
refId=
"
7
"
/>
<end
type=
"TARGET"
refId=
"
6
"
/>
</dependency>
<generalization
id=
"1
4
"
>
<generalization
id=
"1
2
"
>
<end
type=
"SOURCE"
refId=
"1"
/>
<end
type=
"TARGET"
refId=
"3"
/>
</generalization>
<dependency
id=
"1
5
"
>
<dependency
id=
"1
3
"
>
<end
type=
"SOURCE"
refId=
"1"
/>
<end
type=
"TARGET"
refId=
"4"
/>
</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"
sort-features=
"false"
accessors=
"true"
visibility=
"true"
>
<attributes
public=
"true"
package=
"true"
protected=
"true"
private=
"true"
static=
"true"
/>
...
...
promise/src/main/java/com/iluwatar/promise/App.java
浏览文件 @
5796e196
...
...
@@ -61,11 +61,12 @@ import java.util.concurrent.Executors;
public
class
App
{
private
static
final
String
DEFAULT_URL
=
"https://raw.githubusercontent.com/iluwatar/java-design-patterns/Promise/promise/README.md"
;
private
ExecutorService
executor
;
private
CountDownLatch
stopLatch
=
new
CountDownLatch
(
2
)
;
private
final
ExecutorService
executor
;
private
final
CountDownLatch
stopLatch
;
private
App
()
{
executor
=
Executors
.
newFixedThreadPool
(
2
);
stopLatch
=
new
CountDownLatch
(
2
);
}
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录