아래의 글은 라울-게이브리얼 우르마, 마리오 푸스코, 앨런 마이크로프트 저/우정은 역, 『모던 자바 인 액션』,한빛미디어(2019), CH01의 내용을 기반으로 작성하였습니다.

Fork Join

Divide and conquer

Thread pool

 

Fork

Divide

Sub Branch

Stream Parallel 주의

내부 로직이 병렬성이 될지를 고민, 자료구조, 연산방식

타입 박싱 주의

Limit, findFirst 보다 findAny

소량은 fork join 비용이 더 높음

 

Parallel 성능 – N 1_000_000

Parallel 성능 – N 5 _000_000

Design pattern

Strategy 패턴

Interface execute

Interface validate

Class StringValidate

Class IntegerValidate

 

template 메소드 패턴

observer 메소드 패턴

registerObserver n times

Notify method call once, loop notify n times

Factory chain 패턴

Add successtor

Execute handlerequest both self

and successor

Then execute like chained

팩토리 method 패턴

List wishList = New ArrayList<>();

list.add(“Watch”);

List.add(“Phone”);

Arrays.asList(“Watch”, “Phone”)

Java 9

List.of(“Watch”, “Phone”);

참조사이트 :

blog.naver.com/PostView.nhn?blogId=2feelus&logNo=220732310413

 

Fork Join Framework - ForkJoinPool

ForkJoinPool 정확히는 Fork Join Framework 이라고 불러야 하고, ForkJoinPool은 그것의 대표 클...

blog.naver.com

 

okky.kr/article/345720

 

OKKY | [Java] 쓰레드풀 과 ForkJoinPool

메모리풀/쓰레드풀/캐쉬풀/DB풀  Pool 4총사 중 먼저  쓰레드 풀에 대해서 쉽게 그림으로 배워보아요. 오류나 추가사항이 있으면 댓글로 남겨주시면 소정의  포옹으로 보답을.... 쿨럭 자 시작합�

okky.kr

 

+ Recent posts