forked from iluwatar/java-design-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththread-pool.urm.puml
More file actions
37 lines (37 loc) · 809 Bytes
/
thread-pool.urm.puml
File metadata and controls
37 lines (37 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@startuml
package com.iluwatar.threadpool {
class App {
- LOGGER : Logger {static}
+ App()
+ main(args : String[]) {static}
}
class CoffeeMakingTask {
- TIME_PER_CUP : int {static}
+ CoffeeMakingTask(numCups : int)
+ toString() : String
}
class PotatoPeelingTask {
- TIME_PER_POTATO : int {static}
+ PotatoPeelingTask(numPotatoes : int)
+ toString() : String
}
abstract class Task {
- ID_GENERATOR : AtomicInteger {static}
- id : int
- timeMs : int
+ Task(timeMs : int)
+ getId() : int
+ getTimeMs() : int
+ toString() : String
}
class Worker {
- LOGGER : Logger {static}
- task : Task
+ Worker(task : Task)
+ run()
}
}
Worker --> "-task" Task
CoffeeMakingTask --|> Task
PotatoPeelingTask --|> Task
@enduml