Tag

BlockingQueue

1 views collected around this technical thread.

Sanyou's Java Diary
Sanyou's Java Diary
Apr 24, 2025 · Fundamentals

Master Java’s Concurrent Containers: Deep Dive into ConcurrentHashMap and Queues

This article provides an in‑depth exploration of Java’s concurrent collection classes, covering the design and implementation of ConcurrentHashMap, ConcurrentLinkedQueue, and the seven blocking queue variants, complete with code analysis, performance considerations, and practical usage scenarios for high‑throughput multithreaded applications.

BlockingQueueConcurrentHashMapConcurrentLinkedQueue
0 likes · 50 min read
Master Java’s Concurrent Containers: Deep Dive into ConcurrentHashMap and Queues
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Dec 26, 2023 · Backend Development

Understanding Java Thread Pools: Creation, Execution Flow, Advantages, and Common Implementations

This article introduces Java thread pools, explaining their purpose, creation using ThreadPoolExecutor, execution flow, advantages such as resource reuse and management, common blocking queues, rejection policies, and provides multiple code examples of various pool types and a comprehensive monitoring example.

BlockingQueueExecutorServiceJava
0 likes · 11 min read
Understanding Java Thread Pools: Creation, Execution Flow, Advantages, and Common Implementations
Selected Java Interview Questions
Selected Java Interview Questions
Sep 7, 2023 · Backend Development

Understanding Blocking Queues in Java: Concepts, Types, and Core Methods

Blocking queues are thread‑safe data structures in Java that support blocking operations, enabling producer‑consumer coordination; this article explains their definition, differences from List/Set and regular queues, various implementations such as ArrayBlockingQueue and LinkedBlockingQueue, core methods like take and put, and bounded versus unbounded capacities.

BlockingQueueDataStructureJava
0 likes · 11 min read
Understanding Blocking Queues in Java: Concepts, Types, and Core Methods
Selected Java Interview Questions
Selected Java Interview Questions
May 5, 2023 · Backend Development

High‑Frequency Java Concurrency Questions: AQS, Locks, Thread Pools, Blocking Queues, CountDownLatch, Semaphore, CopyOnWriteArrayList, and ConcurrentHashMap

This article explains the core concepts and common pitfalls of Java's AbstractQueuedSynchronizer (AQS) and its derived utilities such as ReentrantLock, ReentrantReadWriteLock, CountDownLatch, Semaphore, as well as the design and behavior of blocking queues, thread‑pool parameters, CopyOnWriteArrayList, and ConcurrentHashMap, providing code examples and practical guidance.

AQSBlockingQueueConcurrentHashMap
0 likes · 21 min read
High‑Frequency Java Concurrency Questions: AQS, Locks, Thread Pools, Blocking Queues, CountDownLatch, Semaphore, CopyOnWriteArrayList, and ConcurrentHashMap
Cognitive Technology Team
Cognitive Technology Team
Jun 26, 2022 · Backend Development

AsyncAppender OOM, Log Loss, and Blocking Issues – Configuration Guide

The article explains how AsyncAppender uses a BlockingQueue with a default size of 256, how an oversized queue can cause OOM, how the discardingThreshold can lead to loss of TRACE/DEBUG/INFO logs, and provides configuration tips such as adjusting queueSize, setting discardingThreshold to zero, or enabling neverBlock to avoid blocking.

AsyncAppenderBlockingQueueLogback
0 likes · 5 min read
AsyncAppender OOM, Log Loss, and Blocking Issues – Configuration Guide
IT Services Circle
IT Services Circle
Jun 2, 2022 · Fundamentals

Comprehensive Guide to Java Concurrency: Threads, Locks, Executors, and Synchronization Primitives

This article provides an in-depth overview of Java concurrency, covering thread creation, lifecycle, synchronization mechanisms such as locks, semaphores, barriers, atomic classes, concurrent collections, executor frameworks, fork/join, CompletableFuture, and various blocking queues, with code examples and implementation details.

BlockingQueueExecutorServiceJava
0 likes · 52 min read
Comprehensive Guide to Java Concurrency: Threads, Locks, Executors, and Synchronization Primitives
Wukong Talks Architecture
Wukong Talks Architecture
Aug 1, 2021 · Backend Development

Types of Blocking Queues Used in Java Thread Pools

This article explains the different blocking queue implementations—ArrayBlockingQueue, LinkedBlockingQueue, SynchronousQueue, and PriorityBlockingQueue—used by Java thread pools, describing their structures, behavior, fairness settings, and performance characteristics for concurrent task execution.

ArrayBlockingQueueBlockingQueueJava
0 likes · 6 min read
Types of Blocking Queues Used in Java Thread Pools
Top Architect
Top Architect
Apr 27, 2021 · Backend Development

Common Misunderstandings in Thread Pool Configuration and How to Avoid Them

This article explains the inner workings of Java thread pools, clarifies common misconceptions about core pool sizing, BlockingQueue behavior, concurrency calculation, and runtime factors such as GC, providing practical guidance and code examples for correctly configuring thread pools in backend systems.

BlockingQueueJVMJava
0 likes · 12 min read
Common Misunderstandings in Thread Pool Configuration and How to Avoid Them
Selected Java Interview Questions
Selected Java Interview Questions
Nov 24, 2020 · Backend Development

Understanding Java BlockingQueue: Concepts, Implementations, and a Custom Example

This article explains the fundamentals of queues and blocking queues, describes how Java's java.util.concurrent.BlockingQueue works, outlines its main methods and common implementations, and provides a complete custom BlockingQueue source code example for multithreaded producer‑consumer scenarios.

BlockingQueueData StructuresJava
0 likes · 10 min read
Understanding Java BlockingQueue: Concepts, Implementations, and a Custom Example
Sohu Tech Products
Sohu Tech Products
Sep 16, 2020 · Fundamentals

Comprehensive Guide to the Java Queue Family – 18 Types, Interfaces, Implementations and Usage

This article provides an in‑depth overview of Java's Queue hierarchy, covering 18 concrete queue classes, their inheritance relationships, core methods, blocking behavior, real‑world analogies, and code examples, making it the most detailed reference on Java queues available today.

BlockingQueueDataStructureJava
0 likes · 29 min read
Comprehensive Guide to the Java Queue Family – 18 Types, Interfaces, Implementations and Usage
Wukong Talks Architecture
Wukong Talks Architecture
Sep 9, 2020 · Fundamentals

Comprehensive Guide to Java Queue Family: 18 Types, Interfaces, and Implementations

This article provides an in‑depth, illustrated overview of Java's Queue hierarchy, covering 18 concrete queue classes, their inheritance relationships, core methods, blocking and non‑blocking variants, practical usage examples, and code snippets to help developers master queue-based data structures and concurrency utilities.

BlockingQueueData StructuresJava
0 likes · 26 min read
Comprehensive Guide to Java Queue Family: 18 Types, Interfaces, and Implementations
macrozheng
macrozheng
Sep 3, 2020 · Backend Development

Mastering Java Concurrent Queues: When to Use Blocking, Non‑Blocking, and Transfer Queues

This article provides a comprehensive overview of Java's concurrent queue implementations, explaining the differences between blocking and non‑blocking queues, their underlying mechanisms, typical use‑cases, and code examples for classes such as ArrayBlockingQueue, LinkedBlockingQueue, PriorityBlockingQueue, DelayQueue, SynchronousQueue, LinkedTransferQueue, and LinkedBlockingDeque.

BlockingQueueJUCJava
0 likes · 16 min read
Mastering Java Concurrent Queues: When to Use Blocking, Non‑Blocking, and Transfer Queues
Architect
Architect
Jun 14, 2016 · Backend Development

Custom Rejection Policies and Blocking Strategies for Java ThreadPoolExecutor

The article explains how to design a producer‑consumer model using Java's BlockingQueue, customize ThreadPoolExecutor's rejection policies—especially replacing the default AbortPolicy with a blocking strategy via a custom RejectedExecutionHandler—to safely handle full queues and improve concurrency control.

BlockingQueueJavaRejectedExecutionHandler
0 likes · 5 min read
Custom Rejection Policies and Blocking Strategies for Java ThreadPoolExecutor