Ruang penulis
SEBUAH JURNAL TENTANG TEKNOLOGI

Belajar hal baru.
Tulis. Bagikan.

Ruang untuk merangkai pengetahuan, satu baris kode setiap hari.
Temukan tutorial, ide, dan catatan dari perjalanan belajar.

1914 catatan & terus bertumbuh
PILIHAN EDITOR
Java

Memahami Java Stream: olah koleksi dengan lebih ringkas

Pelajari alur filter, map, dan collect untuk mengolah data Java dengan kode yang mudah dibaca.

D Tim Diary Coding · 1 menit baca
UNTUK RASA INGIN TAHUMU

Catatan terbaru.

CONCURRENCY / CATATAN</>
Concurrency26 Des 2025

How do I create custom thread factories?

Creating a custom thread factory in Java is a powerful way to manage how threads are initialized. Instead of using the default factory, you can customize thread names (vital for debugging!), set priority levels, or even create daemon threads. To do this, you need to implement the java.util.concurrent.ThreadFactory interface. 1. Implement the ThreadFactory Interface The […]

Wayan · 2 menit baca
CONCURRENCY / CATATAN</>
Concurrency25 Des 2025

How do I use ExecutorService.invokeAll?

Hello! ExecutorService.invokeAll is a powerful method when you have a collection of tasks and need to wait until every single one of them finishes before moving forward. Here’s a breakdown of how it works and how to use it effectively. What does invokeAll do? Executes a collection of tasks: It takes a Collection of Callable<T> […]

Wayan · 3 menit baca
CONCURRENCY / CATATAN</>
Concurrency24 Des 2025

How do I use ThreadLocal safely?

Using ThreadLocal safely is crucial because, while it provides a way to store data that is accessible only by a specific thread, it can easily lead to memory leaks and unexpected behavior in environments that use thread pools (like Spring MVC or Jakarta EE). Here is how to use it safely in your Java applications. […]

Wayan · 3 menit baca
CRYPTOGRAPHY / CATATAN</>
Cryptography21 Des 2025

How do I use Atomic variables from java.util.concurrent.atomic?

Atomic variables in java.util.concurrent.atomic are designed for lock-free, thread-safe operations on single variables. They leverage low-level CPU instructions like Compare-And-Swap (CAS) to ensure data consistency without the overhead of synchronized blocks. Here’s a guide on how to use the most common atomic classes. 1. AtomicInteger and AtomicLong These are used for numeric counters or IDs. […]

Wayan · 3 menit baca
CONCURRENCY / CATATAN</>
Concurrency20 Des 2025

How do I use ReentrantLock vs synchronized?

In Java, both synchronized and ReentrantLock are used to manage thread safety, but they offer different levels of control and flexibility. 1. synchronized Keyword The synchronized keyword is the built-in mechanism in Java for mutual exclusion. It is simpler to use because the JVM automatically handles acquiring and releasing the lock. Usage: Can be applied […]

Wayan · 3 menit baca
CONCURRENCY / CATATAN</>
Concurrency19 Des 2025

How do I use CountDownLatch for coordination?

A CountDownLatch is a synchronization aid that allows one or more threads to wait until a set of operations being performed in other threads completes. It’s initialized with a given count, and the await() methods block until the current count reaches zero due to invocations of the countDown() method. Here is a practical guide on […]

Wayan · 3 menit baca

Pengetahuan tumbuh ketika dibagikan.

Simpan rasa ingin tahu. Selalu ada hal baru untuk dipelajari.

Jelajahi catatan ↗
Putu Adi Guna Permana
TENTANG PENULIS

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

Penulis dan pendiri Diary Coding — berbagi catatan, tutorial, dan pengalaman seputar pemrograman untuk siapa pun yang ingin terus belajar.