Tag

RejectionPolicy

0 views collected around this technical thread.

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.

ConcurrencyJavaPerformance
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.

ConcurrencyJavaRejectionPolicy
0 likes · 13 min read
Understanding Java ThreadPool Rejection Policies and Their Use Cases
IT Services Circle
IT Services Circle
May 28, 2024 · Backend Development

ThreadPoolExecutor Rejection Policies: Risks of CallerRunsPolicy and Mitigation Strategies

This article explains the various ThreadPoolExecutor rejection policies, highlights the risks of using CallerRunsPolicy, provides code examples, and suggests mitigation strategies such as adjusting queue size, thread count, or persisting overflow tasks to databases or message queues.

CallerRunsPolicyConcurrencyJava
0 likes · 9 min read
ThreadPoolExecutor Rejection Policies: Risks of CallerRunsPolicy and Mitigation Strategies
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.

BlockingQueueConcurrencyExecutorService
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.

ConcurrencyExecutorJava
0 likes · 15 min read
Understanding Java Threads and Thread Pools
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.

ConcurrencyJavaRejectionPolicy
0 likes · 13 min read
Understanding Java ThreadPoolExecutor Rejection Policies and Their Implementations
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.

ConcurrencyJavaRejectionPolicy
0 likes · 8 min read
Understanding Java ThreadPoolExecutor Rejection Policies
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
May 19, 2021 · Backend Development

What Happens to a Java ThreadPoolExecutor When an OOM Occurs?

This article explores how a Java ThreadPoolExecutor behaves when a task triggers an OutOfMemoryError, demonstrates custom exception handling, compares the four built‑in rejection policies, and shows how to create a custom thread pool that records task execution time.

ConcurrencyCustomThreadPoolJava
0 likes · 8 min read
What Happens to a Java ThreadPoolExecutor When an OOM Occurs?