diff --git a/tolerant-reader/README.md b/tolerant-reader/README.md index 720764214..a6c21a64a 100644 --- a/tolerant-reader/README.md +++ b/tolerant-reader/README.md @@ -33,6 +33,10 @@ In plain words > Be conservative in what you do, be liberal in what you accept from others. +Sequence diagram + +![Tolerant Reader sequence diagrams](./etc/tolerant-reader-sequence-diagram.png) + ## Programmatic Example of Tolerant Reader Pattern in Java We are persisting `RainbowFish` objects to file. Later on they need to be restored. What makes it problematic is that `RainbowFish` data structure is versioned and evolves over time. New version of `RainbowFish` needs to be able to restore old versions as well. diff --git a/tolerant-reader/etc/tolerant-reader-sequence-diagram.png b/tolerant-reader/etc/tolerant-reader-sequence-diagram.png new file mode 100644 index 000000000..26e68ccff Binary files /dev/null and b/tolerant-reader/etc/tolerant-reader-sequence-diagram.png differ diff --git a/trampoline/README.md b/trampoline/README.md index cb4162baf..706b58d24 100644 --- a/trampoline/README.md +++ b/trampoline/README.md @@ -36,6 +36,10 @@ Wikipedia says > In Java, trampoline refers to using reflection to avoid using inner classes, for example in event listeners. The time overhead of a reflection call is traded for the space overhead of an inner class. Trampolines in Java usually involve the creation of a GenericListener to pass events to an outer class. +Flowchart + +![Trampoline Pattern Flowchart](./etc/trampoline-flowchart.png) + ## Programmatic Example of Trampoline Pattern in Java Here's the `Trampoline` implementation in Java. diff --git a/trampoline/etc/trampoline-flowchart.png b/trampoline/etc/trampoline-flowchart.png new file mode 100644 index 000000000..99387567b Binary files /dev/null and b/trampoline/etc/trampoline-flowchart.png differ