Skip to content

Commit 261da00

Browse files
committed
docs: poison pill and private class data diagrams
1 parent fdd07c7 commit 261da00

File tree

6 files changed

+12
-5
lines changed

6 files changed

+12
-5
lines changed

poison-pill/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ In plain words
2929

3030
> Poison Pill is a known message structure that ends the message exchange.
3131
32+
Sequence diagram
33+
34+
![Poison Pill sequence diagram](./etc/poison-pill-sequence-diagram.png)
35+
3236
## Programmatic Example of Poison Pill Pattern in Java
3337

3438
In this Java example, the Poison Pill serves as a shutdown signal within message queues, demonstrating effective thread management and consumer communication.
@@ -210,10 +214,6 @@ Program output:
210214
07:43:01.520 [Thread-0] INFO com.iluwatar.poison.pill.Consumer -- Consumer CONSUMER_1 receive request to terminate.
211215
```
212216

213-
## Detailed Explanation of Poison Pill Pattern with Real-World Examples
214-
215-
![Poison Pill](./etc/poison-pill.png "Poison Pill")
216-
217217
## When to Use the Poison Pill Pattern in Java
218218

219219
Use the Poison Pill idiom when:
57.8 KB
Loading

presentation-model/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ Architecture diagram
3333

3434
![Presentation Model Architecture Diagram](./etc/presentation-model-architecture-diagram.png)
3535

36-
3736
## Programmatic Example of Presentation Model Pattern in Java
3837

3938
The Presentation Model design pattern is a pattern that separates the responsibility of managing the state and behavior of the GUI in a separate model class. This model class is not tied to the view and can be used to test the GUI behavior independently of the GUI itself.

private-class-data/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ Wikipedia says
3333

3434
> Private class data is a design pattern in computer programming used to encapsulate class attributes and their manipulation.
3535
36+
Mind map
37+
38+
![Private Class Data mind map](./etc/private-class-data-mind-map.png)
39+
40+
Flowchart
41+
42+
![Private Class Data flowchart](./etc/private-class-data-flowchart.png)
43+
3644
## Programmatic Example of Private Class Data Pattern in Java
3745

3846
Imagine you are cooking a stew for your family dinner. You want to stop your family members from tasting the stew while you're still preparing it. If they do, there might not be enough stew left for dinner.
Loading
Loading

0 commit comments

Comments
 (0)