29 Kasım 2026 Pazar

JEP 444 - Virtual Threads

Açıklaması şöyle
virtual threads don't remove your bottlenecks, they move them
 
with a regular tomcat setup you had 200 threads, so at most 200 requests were in flight at once
 
turn on spring.threads.virtual.enabled and that cap becomes tomcat's max-connections, 8192 by default. thousands of requests in flight, each on its own virtual thread, all happy to wait
 
your DB itself is still protected, hikari's pool (10 connections by default) was always the real limit there. what changes is the line in front of it. before, at most 200 threads could wait for a connection. now it can be thousands, and once the wait goes past connectionTimeout (30s by default) requests start failing instead of just being slow
downstream calls with no limit of their own feel it the most. the API you call just got a lot more concurrent traffic from you what to think about before flipping the flag:

how long a request should wait for a DB connection, and what happens when it can't get one
limits on downstream calls. JEP 444 suggests a Semaphore, not pooling virtual threads. just remember it's per instance, so 50 permits on 6 pods is 300 calls 
a timeout on every downstream call, or one hung request keeps its permit forever load testing with realistic concurrency, not just measuring throughput
Çok fazla virtual thread varsa işlemleri sınırlandırmak için Semaphore kullanılır.

25 Kasım 2026 Çarşamba

LazyConstant

Giriş
Java 27 ile preview olarak geliyor. Double checked locking yapmaktan kurtarırı

Örnek
Şöyle yaparız
private final LazyConstant<Foo> fooConfig = LazyConstant.of(Foo::load);

erişmek için şöyle yaparız
Foo foo = fooConfig.get();


13 Kasım 2026 Cuma

jcmd komutu GC Seçenekleri

GC.class_histogram seçeneği
Metaspace bilgisini yazar
Örnek
Şöyle yaparız
# Ekrana
jcmd {pid} GC.class_histogram

# Dosyaya
jcmd {pid} GC.class_histogram filename={file-path}

GC.heap_dump seçeneği
Çalışmakta olan uygulamanın heap dump çıktısını oluşturur

Örnek
Şöyle yaparız
jcmd <PID> GC.heap_dump /tmp/heap.hprof
Şöyle yaparız
jcmd 37320 GC.heap_dump /opt/tmp/heapdump.bin

6 Ekim 2026 Salı

JEP 519 Compact Object Headers

Giriş
Java 27 ile varsayılan davranış. İlave bir seçenek kullanmaya gerek yok. Açıklaması şöyle
Up to Java 26, the object header was 96 bits (12 bytes) in size by default. Since Java 27, it is 64 bits (8 bytes) by default – and this article explains how that works.

5 Ekim 2026 Pazartesi

JEP 540 Simple JSON API

Giriş
Java 28 ile gelmesi öneriliyor

Şu Json tipleri öneriliyor
JsonObject
JsonArray
JsonString
JsonNumber
JsonBoolean
JsonNull

Örnek
Jackson ile şöyle yapmak lazım
var mapper = new ObjectMapper();
Config config =   mapper.readValue(json,Config.class);

Ancak Simple JSON API ile şöyle yaparız
JsonValue json = Json.parse("""
{ "service": "passport", "port": 8443, "enabled": true } """); String service = json.get("service").asString(); int port = json.get("port").asInt(); boolean enabled = json.get("enabled").asBoolean();

Nested object için şöyle yaparız. Yani user altındaki address nesnesinin altındaki city alanını buluruz.
String city = Json.parse(body)
                 .get("user")
                 .get("address")
                 .get("city")
                 .asString();

30 Eylül 2026 Çarşamba

Type-state Pattern - Phantom Types

Giriş
Type safe Java içindir

Örnek
Şöyle bir kod olsun
sealed interface OrderState
        permits Unpaid, Paid, Shipped {
}
record Unpaid() implements OrderState {}
record Paid() implements OrderState {}
record Shipped() implements OrderState {}

Order şöyle olsun
record Order<S extends OrderState>(
        String id
) {
}

Factory ve transition şöyle olsun
static Order<Unpaid> newOrder(String id) {
    return new Order<>(id);
}

static Order<Paid> pay(Order<Unpaid> order) {
    return new Order<>(order.id());
}

static Order<Shipped> ship(Order<Paid> order) {
    return new Order<>(order.id());
}

Artık API şöyle
Order<Shipped> ship(Order<Paid> order)


2 Temmuz 2026 Perşembe

async-profiler Aracı

Giriş
Flame graph üretir, grafiği nasıl yorumlayacağımızı anlatan bir yazı burada. Kullanım şöyle
asprof -d 30 -f flamegraph.html <PID>