File tree Expand file tree Collapse file tree 3 files changed +87
-0
lines changed
Expand file tree Collapse file tree 3 files changed +87
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : JDK 21
3+ description :
4+ aliases : []
5+ date : 2025-09-05
6+ tags : [Java, JDK]
7+ comments : true
8+ ---
9+ # JDK 21
10+ ## Features
11+ - 430: String Templates (Preview)
12+ - 431: Sequenced Collections
13+ - 439: Generational ZGC
14+ - 440: Record Patterns
15+ - 441: Pattern Matching for switch
16+ - 442: Foreign Function & Memory API (Third Preview)
17+ - 443: Unnamed Patterns and Variables (Preview)
18+ - 444: [[ Virtual Thread]]
19+ - 445: Unnamed Classes and Instance Main Methods (Preview)
20+ - 446: [[ ScopedValue]] (Preview)
21+ - 448: Vector API (Sixth Incubator)
22+ - 449: Deprecate the Windows 32-bit x86 Port for Removal
23+ - 451: Prepare to Disallow the Dynamic Loading of Agents
24+ - 452: Key Encapsulation Mechanism API
25+ - 453: Structured Concurrency (Preview)
26+
27+ ## Reference
28+ - https://openjdk.org/projects/jdk/21/
Original file line number Diff line number Diff line change 1+ ---
2+ title : JDK 25
3+ description :
4+ aliases : []
5+ date : 2025-09-05
6+ tags : [Java, JDK]
7+ comments : true
8+ ---
9+ # JDK 25
10+ ## Features
11+ - 470: PEM Encodings of Cryptographic Objects (Preview)
12+ - 502: Stable Values (Preview)
13+ - 503: Remove the 32-bit x86 Port
14+ - 505: Structured Concurrency (Fifth Preview)
15+ - 506: [[ ScopedValue]]
16+ - 507: Primitive Types in Patterns, instanceof, and switch (Third Preview)
17+ - 508: Vector API (Tenth Incubator)
18+ - 509: JFR CPU-Time Profiling (Experimental)
19+ - 510: Key Derivation Function API
20+ - 511: Module Import Declarations
21+ - 512: Compact Source Files and Instance Main Methods
22+ - 513: Flexible Constructor Bodies
23+ - 514: Ahead-of-Time Command-Line Ergonomics
24+ - 515: Ahead-of-Time Method Profiling
25+ - 518: JFR Cooperative Sampling
26+ - 519: Compact Object Headers
27+ - 520: JFR Method Timing & Tracing
28+ - 521: Generational Shenandoah
29+
30+ ## Reference
31+ - https://openjdk.org/projects/jdk/25/
32+
Original file line number Diff line number Diff line change 1+ ---
2+ title : ScopedValue
3+ description :
4+ aliases : []
5+ date : 2025-09-05
6+ tags : [Java]
7+ comments : true
8+ ---
9+ # ScopedValue
10+ - Java 21에서 도입된 ScopedValue는 [[ ThreadLocal]] 의 대안으로, 특정 스레드 컨텍스트 내에서 안전하게 값을 전달할 수 있도록 설계
11+ - 이는 특히 가변성(mutation) 문제를 피하면서 효율적인 데이터 전달을 가능
12+
13+ ## 특징
14+ - Immutability: 한 번 설정되면 변경할 수 없음
15+ - Context Bound: 특정 범위(스코프) 내에서만 유효
16+ - Thread Safety: ThreadLocal과 달리 불변성을 유지하여 동시성 이슈 감소
17+ - GC 친화적: 불필요한 참조를 남기지 않음
18+
19+ ## ThreadLocal 차이
20+ | 특징 | [[ ScopedValue]] | [[ ThreadLocal]] |
21+ | :---------: | :-------------: | :-------------: |
22+ | 변경 여부 | Immutability | Mutable |
23+ | GC | Scope 종료시 | 명시적 제거 |
24+ | Thread Safe | 없음 | 발생 가능성 |
25+
26+ ## Reference
27+ - https://openjdk.org/jeps/506
You can’t perform that action at this time.
0 commit comments