Tagged articles
18 articles
Page 1 of 1
FunTester
FunTester
Dec 20, 2024 · Backend Development

Understanding Java ThreadFactory, Rejection Policies, and Dynamic Thread Pool Management

This article explains Java's ThreadFactory interface, demonstrates how to customize thread names, explores the four built‑in rejection policies of ThreadPoolExecutor with code examples, and shows techniques for dynamic adjustment of core and maximum pool sizes, including custom policies and blocking queue task submission.

DynamicThreadPoolJavaRejectionPolicy
0 likes · 19 min read
Understanding Java ThreadFactory, Rejection Policies, and Dynamic Thread Pool Management
Top Architecture Tech Stack
Top Architecture Tech Stack
Nov 27, 2024 · Backend Development

Understanding Java ThreadPoolExecutor Rejection Policies and Their Use Cases

Java's ThreadPoolExecutor provides four built‑in RejectedExecutionHandler strategies—AbortPolicy, CallerRunsPolicy, DiscardPolicy, and DiscardOldestPolicy—each suited to different overload scenarios, and this article explains their behavior, trigger conditions, and practical application guidelines for robust backend concurrency management.

JavaRejectionPolicyThreadPoolExecutor
0 likes · 10 min read
Understanding Java ThreadPoolExecutor Rejection Policies and Their Use Cases
Top Architecture Tech Stack
Top Architecture Tech Stack
Nov 19, 2024 · Backend Development

Understanding Java ThreadPool Rejection Policies and Their Use Cases

This article explains the conditions that trigger Java thread‑pool rejection policies, describes the four built‑in policies (AbortPolicy, CallerRunsPolicy, DiscardPolicy, DiscardOldestPolicy), provides detailed code examples for each, and discusses suitable application scenarios for backend developers.

Backend DevelopmentJavaRejectionPolicy
0 likes · 13 min read
Understanding Java ThreadPool Rejection Policies and Their Use Cases
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
政采云技术
政采云技术
Sep 13, 2023 · Backend Development

Understanding Java Threads and Thread Pools

This article explains the concept of threads in Java, how to create them, the purpose and benefits of thread pools, the inheritance hierarchy of Java's Executor framework, key parameters of ThreadPoolExecutor, rejection policies, pool states, and the underlying working mechanism, supplemented with code examples.

ExecutorJavaRejectionPolicy
0 likes · 15 min read
Understanding Java Threads and Thread Pools
Senior Brother's Insights
Senior Brother's Insights
Nov 1, 2021 · Backend Development

Mastering Java ThreadPoolExecutor: Design, Configuration, and Best Practices

This article explains why using ThreadPoolExecutor directly is preferred over Executors, details the thread pool's purpose, internal architecture, task handling flow, state management, API parameters, queue choices, rejection policies, sizing formulas, and provides practical code examples for custom thread pool implementations.

BlockingQueueCustomThreadFactoryExecutorService
0 likes · 22 min read
Mastering Java ThreadPoolExecutor: Design, Configuration, and Best Practices
Top Architect
Top Architect
Sep 25, 2021 · Backend Development

Understanding Java ThreadPoolExecutor Rejection Policies and Their Implementations

This article explains the design of thread pools, when Java's ThreadPoolExecutor triggers rejection policies, details the four built‑in JDK policies and compares several third‑party implementations such as Dubbo, Netty, ActiveMQ and Pinpoint, helping developers choose the appropriate strategy for different scenarios.

JavaRejectionPolicyThreadPoolExecutor
0 likes · 13 min read
Understanding Java ThreadPoolExecutor Rejection Policies and Their Implementations
Programmer DD
Programmer DD
Sep 24, 2021 · Backend Development

What Happens When a Spring Boot ThreadPool Overflows? Learn Rejection Strategies

This article demonstrates how a Spring Boot thread pool behaves when its core size, max size, and queue capacity are exceeded by multiple asynchronous tasks, explains the resulting TaskRejectedException, and shows how to configure built‑in or custom rejection policies to handle such scenarios.

AsyncJavaRejectionPolicy
0 likes · 9 min read
What Happens When a Spring Boot ThreadPool Overflows? Learn Rejection Strategies
Java Interview Crash Guide
Java Interview Crash Guide
Aug 5, 2021 · Backend Development

Mastering Java ThreadPoolExecutor: 4 Rejection Policies Explained & When to Use Them

Java's ThreadPoolExecutor offers four rejection policies—AbortPolicy, DiscardPolicy, DiscardOldestPolicy, and CallerRunsPolicy—each handling task overflow differently; this article explains their behavior, default setting, code examples, and how to configure them via Spring's ThreadPoolTaskExecutor for various business scenarios.

JavaRejectionPolicyThreadPoolExecutor
0 likes · 9 min read
Mastering Java ThreadPoolExecutor: 4 Rejection Policies Explained & When to Use Them
Selected Java Interview Questions
Selected Java Interview Questions
Aug 4, 2021 · Backend Development

Understanding Java ThreadPoolExecutor Rejection Policies

This article explains the four rejection policies of Java's ThreadPoolExecutor, shows the default AbortPolicy behavior, provides code examples for each policy, and demonstrates how to configure custom policies using both raw ThreadPoolExecutor and Spring's ThreadPoolTaskExecutor.

BackendJavaRejectionPolicy
0 likes · 8 min read
Understanding Java ThreadPoolExecutor Rejection Policies
Programmer DD
Programmer DD
Mar 6, 2020 · Backend Development

Mastering Java ThreadPoolExecutor Rejection Policies: When and How to Use Them

This article explains the design principles of thread pools, when Java's ThreadPoolExecutor triggers rejection policies, details the four built‑in JDK policies with code examples, and explores additional strategies from Dubbo, Netty, ActiveMQ and Pinpoint, helping developers choose the right approach for their workloads.

BackendJDKJava
0 likes · 13 min read
Mastering Java ThreadPoolExecutor Rejection Policies: When and How to Use Them
Programmer DD
Programmer DD
Sep 15, 2019 · Backend Development

Mastering Java ThreadPool Rejection Policies: When and How to Choose

This article explains the design principles of thread pools, the conditions that trigger rejection policies in Java's ThreadPoolExecutor, details the four built‑in JDK strategies, and reviews several third‑party implementations with their appropriate use‑cases, helping developers select the right policy for their workloads.

JavaRejectionPolicyThreadPoolExecutor
0 likes · 14 min read
Mastering Java ThreadPool Rejection Policies: When and How to Choose