mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-13 16:14:58 +00:00
docs: add diagrams for marker interface, master-worker, mediator, memento, metadata mapping, microservices api gateway, microservices log aggregation, monad, monitor, monostate, multiton, mute idiom
This commit is contained in:
1 parent
72eeb167c5
commit
8d5cb59388
24 files changed
+48
-4
No files matched your search
@@ -33,6 +33,10 @@ Wikipedia says
|
||||
|
||||
> Master–slave is a model of asymmetric communication or control where one device or process (the master) controls one or more other devices or processes (the slaves) and serves as their communication hub. In some systems, a master is selected from a group of eligible devices, with the other devices acting in the role of slaves.
|
||||
|
||||
Sequence diagram
|
||||
|
||||

|
||||
|
||||
## Programmatic Example of Master-Worker Pattern in Java
|
||||
|
||||
In the provided code, the `MasterWorker` class initiates the concurrent computation process. The `Master` class divides the work among `Worker` objects, each performing its task in parallel, thus optimizing task processing and enhancing system efficiency.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 53 KiB |
Reference in new issue
Block a user