diff --git a/object-pool/README.md b/object-pool/README.md index 56888b017..9746c27c5 100644 --- a/object-pool/README.md +++ b/object-pool/README.md @@ -35,6 +35,10 @@ Wikipedia says > The object pool pattern is a software creational design pattern that uses a set of initialized objects kept ready to use – a "pool" – rather than allocating and destroying them on demand. +Sequence diagram + +![Object Pool sequence diagram](./etc/object-pool-sequence-diagram.png) + ## Programmatic Example of Object Pool Pattern in Java In our war game we need to use oliphaunts, massive and mythic beasts, but the problem is that they are extremely expensive to create. The solution is to create a pool of them, track which ones are in-use, and instead of disposing them re-use the instances. diff --git a/object-pool/etc/object-pool-sequence-diagram.png b/object-pool/etc/object-pool-sequence-diagram.png new file mode 100644 index 000000000..2aa438024 Binary files /dev/null and b/object-pool/etc/object-pool-sequence-diagram.png differ diff --git a/observer/README.md b/observer/README.md index 1bf11fbe3..f5402181a 100644 --- a/observer/README.md +++ b/observer/README.md @@ -33,6 +33,10 @@ Wikipedia says > The observer pattern is a software design pattern in which an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods. +Sequence diagram + +![Observer sequence diagram](./etc/observer-sequence-diagram.png) + ## Programmatic Example of Observer Pattern in Java In a land far away live the races of hobbits and orcs. Both of them are mostly outdoors, so they closely follow the weather changes. One could say that they are constantly observing the weather. diff --git a/observer/etc/observer-sequence-diagram.png b/observer/etc/observer-sequence-diagram.png new file mode 100644 index 000000000..94c7c3ee1 Binary files /dev/null and b/observer/etc/observer-sequence-diagram.png differ