Tagged articles
46 articles
Page 1 of 1
Programmer Null's Self-Cultivation
Programmer Null's Self-Cultivation
Jul 13, 2025 · Backend Development

Unlocking the Secrets of Java’s ConcurrentHashMap: From JDK 7 to JDK 8

This article provides a comprehensive, step‑by‑step analysis of Java's ConcurrentHashMap, covering its evolution from JDK 7’s segment‑lock design to JDK 8’s bucket‑level CAS and synchronized approach, complete with macro diagrams, microscopic source‑code walkthroughs, hash calculations, resizing mechanisms, and practical usage tips.

ConcurrentHashMapHashMapJDK7
0 likes · 16 min read
Unlocking the Secrets of Java’s ConcurrentHashMap: From JDK 7 to JDK 8
Java Tech Enthusiast
Java Tech Enthusiast
Mar 4, 2025 · Fundamentals

Java 8 Map API Enhancements

Java 8 enriches the Map interface with default methods such as getOrDefault, forEach, merge, putIfAbsent, compute, computeIfAbsent, computeIfPresent and replace, allowing developers to retrieve values with fallbacks, iterate entries, combine or conditionally update entries, and thus write more concise, readable code with far less boilerplate.

APICollectionsJDK8
0 likes · 9 min read
Java 8 Map API Enhancements
JD Cloud Developers
JD Cloud Developers
Dec 23, 2024 · Backend Development

How to Add Asynchronous Timeout to CompletableFuture in JDK 8

This article explains why JDK 8's CompletableFuture lacks built‑in timeout interruption, analyzes common usage patterns and their limitations, and presents a custom asynchronous timeout solution that works in both JDK 8 and JDK 9 environments, complete with reusable utility code.

Async TimeoutBackend DevelopmentCompletableFuture
0 likes · 13 min read
How to Add Asynchronous Timeout to CompletableFuture in JDK 8
macrozheng
macrozheng
Nov 14, 2024 · Backend Development

Master Java’s New Map Methods: getOrDefault, forEach, merge & More

Learn how Java 8 introduced powerful Map methods such as getOrDefault, forEach, merge, putIfAbsent, compute, computeIfAbsent, computeIfPresent, and replace, with clear code examples that show how they simplify common tasks like default value handling, iteration, merging entries, and conditional updates.

Backend DevelopmentCode TutorialJDK8
0 likes · 10 min read
Master Java’s New Map Methods: getOrDefault, forEach, merge & More
Architecture Digest
Architecture Digest
Oct 31, 2024 · Backend Development

Java 8 Map New Methods: getOrDefault, forEach, merge, putIfAbsent, compute, computeIfAbsent, computeIfPresent, replace

This article introduces the Java 8 Map API enhancements—including getOrDefault, forEach, merge, putIfAbsent, compute, computeIfAbsent, computeIfPresent, and replace—explaining their purpose, showing concise code examples, and demonstrating how they simplify common map‑handling scenarios.

CollectionsJDK8MAP
0 likes · 9 min read
Java 8 Map New Methods: getOrDefault, forEach, merge, putIfAbsent, compute, computeIfAbsent, computeIfPresent, replace
Selected Java Interview Questions
Selected Java Interview Questions
Dec 2, 2023 · Backend Development

Understanding HashMap Resize Behavior and the Revision from Expansion Count to Resize Count in Alibaba's Developer Manual

This article explains the recent correction in Alibaba's developer manual that replaces the ambiguous "expansion count" of HashMap with the precise "resize count", details the conditions under which HashMap triggers resize during the first put operation, and shows why storing 1024 elements in JDK 1.8 results in eight resize calls.

BackendData StructuresJDK8
0 likes · 9 min read
Understanding HashMap Resize Behavior and the Revision from Expansion Count to Resize Count in Alibaba's Developer Manual
Java Architect Essentials
Java Architect Essentials
Nov 22, 2023 · Information Security

Apache ActiveMQ Remote Code Execution Vulnerability and Mitigation for JDK8/Docker Environments

The article explains the critical remote code execution vulnerability discovered in Apache ActiveMQ, lists the affected and safe versions, and provides practical mitigation steps—including upgrading, network restrictions, and a custom Docker image for JDK8 users—to protect systems from exploitation.

Apache ActiveMQDockerJDK8
0 likes · 4 min read
Apache ActiveMQ Remote Code Execution Vulnerability and Mitigation for JDK8/Docker Environments
JD Tech
JD Tech
May 15, 2023 · Backend Development

Implementing Asynchronous Timeout with CompletableFuture in Java (JDK 8 & JDK 9)

This article explains how to use Java's CompletableFuture for parallel execution, demonstrates the limitations of simple timeout handling in JDK 8, and shows how JDK 9's built‑in orTimeout method and a custom utility class can provide precise asynchronous timeout control for backend services.

Async TimeoutCompletableFutureJDK8
0 likes · 12 min read
Implementing Asynchronous Timeout with CompletableFuture in Java (JDK 8 & JDK 9)
Programmer DD
Programmer DD
Oct 21, 2022 · Backend Development

Boost Java 8 Workloads with Oracle’s Enterprise Performance Pack

Oracle’s Enterprise Performance Pack, offered free to Java SE subscribers and OCI users, brings Java 17‑level memory management and performance enhancements—including modern garbage collection, compact strings, and improved observability—to legacy Java 8 applications, delivering up to 40% better memory and CPU efficiency under heavy loads.

EnterpriseGarbage CollectionJDK8
0 likes · 4 min read
Boost Java 8 Workloads with Oracle’s Enterprise Performance Pack
macrozheng
macrozheng
May 9, 2022 · Backend Development

Master Java Date & Time: From JDK7 Date to JDK8 LocalDate/LocalDateTime

This article compares Java's legacy date handling in JDK7 with the modern java.time API introduced in JDK8, demonstrating how to create, format, and convert dates using LocalDate, LocalDateTime, DateTimeFormatter, and related methods, and provides a comprehensive table of useful LocalDate APIs.

Backend DevelopmentJDK8Java
0 likes · 9 min read
Master Java Date & Time: From JDK7 Date to JDK8 LocalDate/LocalDateTime
Top Architect
Top Architect
Feb 9, 2022 · Backend Development

Deep Dive into Java CompletableFuture: Implementation, Usage, and Internal Mechanics

This article provides an in‑depth analysis of Java’s CompletableFuture introduced in JDK 8, explaining its motivations, core methods, internal mechanisms such as asyncSupplyStage, thenAcceptAsync, and postComplete, and includes practical code examples to illustrate asynchronous task handling and dependency management.

AsynchronousCompletableFutureJDK8
0 likes · 13 min read
Deep Dive into Java CompletableFuture: Implementation, Usage, and Internal Mechanics
Programmer DD
Programmer DD
Dec 19, 2021 · Backend Development

Boost Java Performance 4× with CompletableFuture: When and How to Use It

This article explains how to replace synchronous price‑lookup APIs with Java 8's CompletableFuture, compares synchronous and asynchronous performance, introduces the most useful CompletableFuture creation and composition methods, shows practical code examples, and discusses when to prefer it over traditional Future or thread‑pool approaches.

AsynchronousCompletableFutureJDK8
0 likes · 21 min read
Boost Java Performance 4× with CompletableFuture: When and How to Use It
macrozheng
macrozheng
Aug 27, 2021 · Backend Development

Master Java 8 Optional and Lambda: Reduce Null Checks and Write Cleaner Code

This tutorial explains how Java 8's Optional class and lambda expressions simplify null handling and collection processing, offering concise code examples, method summaries, and a clear comparison with Java 7 approaches to improve readability and development efficiency.

Code ExamplesJDK8Java
0 likes · 8 min read
Master Java 8 Optional and Lambda: Reduce Null Checks and Write Cleaner Code
Selected Java Interview Questions
Selected Java Interview Questions
Aug 1, 2021 · Backend Development

Ways to Create Thread Pools in JDK 1.8

This article introduces the various thread pool creation methods available in JDK 1.8—including fixed, cached, scheduled, single, single‑scheduled, and work‑stealing executors—explains their characteristics, provides sample Java code for each, and shows typical execution results.

ExecutorServiceJDK8Java
0 likes · 10 min read
Ways to Create Thread Pools in JDK 1.8
Java Backend Technology
Java Backend Technology
Apr 28, 2021 · Backend Development

Unlocking Java 8 ConcurrentHashMap: A Deep Dive into Lock‑Free Scaling and Performance

This article explains how Java 8’s ConcurrentHashMap improves concurrency by replacing segment locks with fine‑grained CAS operations, introduces ForwardingNode for lock‑free resizing, and details the internal algorithms for initialization, put, dynamic expansion, and size counting, complete with code examples.

CASConcurrentHashMapJDK8
0 likes · 28 min read
Unlocking Java 8 ConcurrentHashMap: A Deep Dive into Lock‑Free Scaling and Performance
Top Architect
Top Architect
Mar 15, 2021 · Fundamentals

Analysis of JDK 1.8 HashMap Implementation Compared to JDK 1.7

This article explains the major differences between JDK 1.8 and JDK 1.7 HashMap implementations, detailing the initialization process, the putVal algorithm steps, how collisions are handled with linked lists and red‑black trees, and the changes in resizing behavior.

CollectionsData StructuresHashMap
0 likes · 5 min read
Analysis of JDK 1.8 HashMap Implementation Compared to JDK 1.7
Top Architect
Top Architect
Mar 11, 2021 · Fundamentals

Why ConcurrentHashMap.get() in Java 8 Is Lock‑Free

This article explains how Java 8's ConcurrentHashMap implements the get operation without acquiring locks by using volatile fields, CAS, and a simplified node structure, contrasting it with the segment‑based design of JDK 1.7 and detailing the memory‑visibility guarantees provided by volatile.

ConcurrentHashMapJDK8Java
0 likes · 9 min read
Why ConcurrentHashMap.get() in Java 8 Is Lock‑Free
vivo Internet Technology
vivo Internet Technology
Sep 16, 2020 · Backend Development

How ConcurrentHashMap Guarantees Thread‑Safe Reads and Writes: A Deep Dive into C13Map Internals

This article explains the fundamentals of HashMap, then dissects the internal fields, node‑array safety, read‑path guarantees, write‑path locking, atomic compute methods, resize‑transfer mechanics, traverser design, and bulk‑task support that together make Java's ConcurrentHashMap (C13Map) a highly concurrent, lock‑free data structure.

ConcurrentHashMapData StructuresHashMap
0 likes · 49 min read
How ConcurrentHashMap Guarantees Thread‑Safe Reads and Writes: A Deep Dive into C13Map Internals
Sohu Tech Products
Sohu Tech Products
Aug 5, 2020 · Backend Development

Debugging and Fixing the ConcurrentLinkedQueue Memory Leak Bug in JDK8

This article explains the root cause of a memory‑leak bug in JDK8's ConcurrentLinkedQueue, demonstrates how to reproduce and visualize the issue with custom CLQ implementations, analyzes the removal algorithm, and shares practical debugging tips including a notorious IDEA debug pitfall and its resolution.

ConcurrentLinkedQueueDebuggingJDK8
0 likes · 14 min read
Debugging and Fixing the ConcurrentLinkedQueue Memory Leak Bug in JDK8
FunTester
FunTester
Jun 25, 2020 · Fundamentals

Mastering JDK8 Garbage Collection: Visual Cheat Sheet and Tuning Guide

This article presents a comprehensive overview of JDK8's garbage collection mechanisms, detailing memory regions, available collectors, key tuning parameters, thread settings, and practical commands, complemented by eight illustrative diagrams and a downloadable PDF cheat sheet for quick reference.

GC tuningGarbage CollectionJDK8
0 likes · 7 min read
Mastering JDK8 Garbage Collection: Visual Cheat Sheet and Tuning Guide
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Apr 26, 2020 · Fundamentals

Understanding ConcurrentHashMap: Implementation Differences between JDK 1.7 and JDK 1.8

This article explains why ConcurrentHashMap provides thread‑safe and high‑performance map operations, compares it with HashMap and Hashtable, and details the architectural changes from JDK 1.7’s segment‑lock design to JDK 1.8’s array‑list‑red‑black‑tree and CAS‑based implementation.

ConcurrentHashMapData StructuresJDK7
0 likes · 7 min read
Understanding ConcurrentHashMap: Implementation Differences between JDK 1.7 and JDK 1.8
JavaEdge
JavaEdge
Jan 6, 2020 · Fundamentals

Understanding Java CAS: How Compare‑And‑Swap Powers Lock‑Free Concurrency

This article explains the Compare‑And‑Swap (CAS) primitive, its three operands, how Java's Unsafe class implements CAS methods, the internal workings of AtomicInteger, common pitfalls like spinning, single‑variable limits and the ABA problem, and the enhancements introduced in Java 8.

AtomicIntegerCASJDK8
0 likes · 9 min read
Understanding Java CAS: How Compare‑And‑Swap Powers Lock‑Free Concurrency
Beike Product & Technology
Beike Product & Technology
Aug 3, 2018 · Fundamentals

Understanding Java HashMap Optimizations in JDK 1.8

This article explains the fundamental principles of Java's HashMap, covering hash basics, time‑complexity of operations, the role of load factor and initial capacity, the resize algorithm without full rehashing, and the treeification of long buckets, illustrated with JDK 1.8 source code examples.

Data StructuresHashMapJDK8
0 likes · 16 min read
Understanding Java HashMap Optimizations in JDK 1.8