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.
624
+
625
+
**Applicability:** Use async method invocation pattern when
626
+
* You have multiple independent tasks that can run in parallel
627
+
* You need to improve performance of running a group of sequential tasks
628
+
* You have limited number of processing capacity or long running tasks and the caller cannot wait the tasks to be ready
629
+
630
+
**Real world examples:**
631
+
*[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)
622
635
**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