You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Intent:** Asynchronous method invocation is pattern where the calling thread is not blocked while waiting results of tasks. The pattern provides parallel processing of multiple independent tasks and retrieving the results via callbacks or waiting until everything is done.
625
+
626
+
**Applicability:** Use async method invocation pattern when
627
+
* You have multiple independent tasks that can run in parallel
628
+
* You need to improve performance of running a group of sequential tasks
629
+
* You have limited number of processing capacity or long running tasks and the caller cannot wait the tasks to be ready
630
+
631
+
**Real world examples:**
632
+
*[FutureTask](http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/FutureTask.html), [CompletableFuture](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html) and [ExecutorService](http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html) (Java)
## <aname="private-class-data">Private Class Data</a> [↑](#list-of-design-patterns)
623
636
**Intent:** Private Class Data design pattern seeks to reduce exposure of attributes by limiting their visibility. It reduces the number of class attributes by encapsulating them in single Data object.
0 commit comments