Tag

ScheduledExecutorService

0 views collected around this technical thread.

Selected Java Interview Questions
Selected Java Interview Questions
Mar 10, 2025 · Backend Development

Postmortem of a Server Crash Caused by a Mis‑managed Scheduled Task in a Backend Module

The article analyzes a server outage triggered by a module that repeatedly created a scheduled task without proper lifecycle control, examines the problematic Java code, lists four key issues, presents a corrected implementation, and reflects on development, testing, review, and logging practices to prevent similar incidents.

IncidentJavaScheduledExecutorService
0 likes · 5 min read
Postmortem of a Server Crash Caused by a Mis‑managed Scheduled Task in a Backend Module
Architecture Digest
Architecture Digest
Jan 10, 2025 · Backend Development

Implementing a Distributed Redis Lock with Spring AOP and Automatic Renewal

This article explains how to protect time‑consuming business operations and critical data by designing a Redis‑based distributed lock using custom annotations, Spring AOP, and a ScheduledExecutorService that automatically extends the lock’s expiration to avoid premature release.

Distributed LockJavaRedis
0 likes · 11 min read
Implementing a Distributed Redis Lock with Spring AOP and Automatic Renewal
IT Services Circle
IT Services Circle
Jan 7, 2025 · Backend Development

Replacing Thread.sleep Loops with Proper Scheduling in Java

The article explains why using Thread.sleep in a loop causes busy‑waiting and performance problems, and demonstrates several Java scheduling alternatives—including Timer/TimerTask, ScheduledExecutorService, wait/notify, and CompletableFuture—to efficiently check a flag at fixed intervals.

CompletableFutureJavaScheduledExecutorService
0 likes · 9 min read
Replacing Thread.sleep Loops with Proper Scheduling in Java
Java Architect Essentials
Java Architect Essentials
Nov 12, 2023 · Backend Development

Request Merging in Java: Concept, Pros & Cons, and Implementation with ScheduledExecutorService

This article explains the concept of request merging for high‑concurrency web services, outlines its advantages and drawbacks, and provides a complete Java implementation using ScheduledExecutorService, a memory queue, and a generic BatchCollapser utility with usage examples.

JavaPerformance OptimizationScheduledExecutorService
0 likes · 8 min read
Request Merging in Java: Concept, Pros & Cons, and Implementation with ScheduledExecutorService
Architect's Guide
Architect's Guide
Dec 31, 2022 · Backend Development

Implementing a Distributed Redis Lock with Spring AOP and Automatic Renewal

This article explains how to protect time‑consuming business operations using a Redis‑based distributed lock, detailing the annotation design, AOP pointcut, lock acquisition and release, timeout handling, and a scheduled renewal mechanism with sample Java code.

Distributed LockJavaRedis
0 likes · 13 min read
Implementing a Distributed Redis Lock with Spring AOP and Automatic Renewal
Java Architect Essentials
Java Architect Essentials
Nov 6, 2022 · Backend Development

Implementing a Distributed Redis Lock with AOP and Automatic Renewal in Java

This article explains how to design and implement a distributed lock using Redis, Spring AOP annotations, and a scheduled executor to automatically extend lock expiration, providing complete Java code examples, configuration details, testing procedures, and best‑practice recommendations for handling long‑running business operations safely.

AOPDistributed LockJava
0 likes · 12 min read
Implementing a Distributed Redis Lock with AOP and Automatic Renewal in Java
Top Architect
Top Architect
Oct 20, 2022 · Backend Development

Implementing a Redis Distributed Lock with Spring AOP and Automatic Renewal

This article explains how to implement a Redis-based distributed lock in Spring Boot using custom annotations, AOP interception, and a scheduled executor to automatically renew lock expiration, providing a complete design, code examples, and testing guidance for handling long-running operations safely.

Distributed LockJavaRedis
0 likes · 12 min read
Implementing a Redis Distributed Lock with Spring AOP and Automatic Renewal
Top Architect
Top Architect
Oct 11, 2022 · Backend Development

Implementing Distributed Locks with Redis and AOP in Spring Boot

This article explains how to protect time‑consuming business operations by using Redis as a distributed lock together with Spring AOP, covering annotation design, aspect implementation, lock acquisition, automatic renewal via a scheduled executor, and practical testing examples.

AOPDistributed LockJava
0 likes · 15 min read
Implementing Distributed Locks with Redis and AOP in Spring Boot
Code Ape Tech Column
Code Ape Tech Column
Sep 29, 2022 · Backend Development

Implementing a Redis Distributed Lock with AOP and Automatic Renewal in Spring Boot

This article explains how to protect time‑consuming business operations in a Spring Boot application by creating a custom @RedisLock annotation, using Redis as a distributed lock via AOP, implementing automatic lock renewal with a ScheduledExecutorService, and handling lock release and thread interruption.

AOPDistributed LockJava
0 likes · 11 min read
Implementing a Redis Distributed Lock with AOP and Automatic Renewal in Spring Boot
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 16, 2021 · Backend Development

Mastering Java Scheduled Tasks: Timer vs ScheduledExecutorService

This article compares Java's Timer and ScheduledExecutorService for scheduling tasks, explains their internal workings, demonstrates common pitfalls, and provides multiple code examples showing how to schedule one‑off, fixed‑rate, and fixed‑delay tasks using both Runnable and Callable.

JavaScheduledExecutorServiceTimer
0 likes · 8 min read
Mastering Java Scheduled Tasks: Timer vs ScheduledExecutorService
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Aug 18, 2020 · Backend Development

Implementing Scheduled Tasks in Java: Timer, ScheduledExecutorService, Spring Task, and Distributed Approaches

This article explains several ways to implement scheduled tasks in Java, covering the simple Timer class, the more robust ScheduledExecutorService, Spring's @Scheduled annotation, and distributed solutions using Redis ZSet and key‑space notifications, with code examples and practical considerations.

JavaRedisScheduledExecutorService
0 likes · 16 min read
Implementing Scheduled Tasks in Java: Timer, ScheduledExecutorService, Spring Task, and Distributed Approaches
Java Captain
Java Captain
Aug 29, 2018 · Backend Development

Java Timer, ScheduledExecutorService, and Quartz: A Comprehensive Guide to Task Scheduling

This article provides a thorough overview of Java task scheduling, covering the native Timer utility, the thread‑pool‑based ScheduledExecutorService, and the powerful Quartz framework, including their APIs, usage patterns, limitations, and integration with Spring for enterprise applications.

Backend DevelopmentJavaQuartz
0 likes · 8 min read
Java Timer, ScheduledExecutorService, and Quartz: A Comprehensive Guide to Task Scheduling