SupportWriter space ↗
REFERENCE LIBRARY

References from other publishers

Republished articles with source attribution. This collection is separate from Diary Coding’s original guides and does not display ads.

Read original guides → · Editorial policy

FOR YOUR CURIOSITY

Latest notes.

CONCURRENCY / NOTES</>↗
Concurrency13 May 2025

How do I manage thread-local state in highly concurrent environments?

Managing thread-local state in a highly concurrent environment requires an understanding of ThreadLocal in Java and certain best practices to ensure correctness and good performance. Here’s how you can effectively manage thread-local state: 1. Use ThreadLocal for Thread-Specific State The ThreadLocal class provides thread-local variables. Each thread accessing such a variable gets its own, independent […]

Wayan · 3 min read
JSCH / NOTES</>↗
JSch12 May 2025

How do I handle interactive prompts and keyboard-interactive authentication using JSch?

When working with JSch (Java Secure Channel) for SSH connections, handling interactive prompts and keyboard-interactive authentication requires implementing the UserInfo and UIKeyboardInteractive interfaces provided by JSch. These interfaces allow you to interact with the user to gather necessary input for authentication (like passwords, passphrases, or other interactive challenges like 2FA). Here’s a step-by-step process: Steps […]

Wayan · 4 min read
CONCURRENCY / NOTES</>↗
Concurrency12 May 2025

How do I design non-blocking algorithms with ConcurrentLinkedQueue?

Designing non-blocking algorithms with ConcurrentLinkedQueue can be a powerful way to build high-performance concurrent applications. ConcurrentLinkedQueue is a thread-safe, non-blocking queue implementation based on a lock-free linked node algorithm. It uses atomic operations (through sun.misc.Unsafe or java.util.concurrent.atomic package underneath) to ensure thread safety without locking, making it highly scalable. Here’s how to approach the design […]

Wayan · 5 min read
CONCURRENCY / NOTES</>↗
Concurrency12 May 2025

How do I leverage StampedLock for high-performance read/write locking?

The StampedLock class in Java’s concurrency utilities (introduced in Java 8) is a high-performance read/write lock that differs from traditional ReadWriteLock (like ReentrantReadWriteLock) due to its ability to provide three locking modes: Write Lock: Exclusive access. Read Lock: Shared (non-exclusive) access. Optimistic Read Lock: A lightweight, non-blocking read lock for scenarios where reads dominate writes, […]

Wayan · 4 min read
JSCH / NOTES</>↗
JSch11 May 2025

How do I integrate JSch with a custom logging framework for SSH auditing?

Integrating JSch with a custom logging framework to facilitate SSH auditing involves capturing and routing pertinent log information about SSH connections, commands, and activities into your custom logging mechanism. Below are the steps and considerations to achieve this: 1. Set a Custom Logger for JSch JSch allows integration with custom loggers by implementing the com.jcraft.jsch.Logger […]

Wayan · 5 min read
CONCURRENCY / NOTES</>↗
Concurrency11 May 2025

How do I optimize task splitting strategies in RecursiveTask?

Optimizing task-splitting strategies in RecursiveTask (a subclass of the ForkJoin framework in Java) is crucial for improving performance and minimizing inefficiencies like excessive overhead or poor parallelism. Here are some strategies and tips to achieve efficient task splitting: 1. Choose an Optimal Threshold The optimal threshold (commonly called a “granularity threshold”) determines when you should […]

Wayan · 5 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.