class BatchFlusher
extends java.lang.Object
GatheringByteChannel, collapsing multiple writes
into fewer syscalls.| Modifier and Type | Field and Description |
|---|---|
private io.netty.channel.Channel |
channel |
private io.netty.channel.EventLoop |
eventLoop |
private java.lang.Runnable |
flush
Used to flush all outstanding writes in the outbound channel buffer.
|
private int |
maxPending |
private int |
pending |
private java.lang.Runnable |
wakeup
Used to wake up the event loop and schedule a flush to be performed after all outstanding write
tasks are run.
|
private int |
woken |
private java.util.concurrent.atomic.AtomicIntegerFieldUpdater<BatchFlusher> |
WOKEN |
| Constructor and Description |
|---|
BatchFlusher(io.netty.channel.Channel channel,
int maxPending) |
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
Schedule an asynchronous opportunistically batching flush.
|
private final io.netty.channel.Channel channel
private final io.netty.channel.EventLoop eventLoop
private final int maxPending
private final java.util.concurrent.atomic.AtomicIntegerFieldUpdater<BatchFlusher> WOKEN
private volatile int woken
private int pending
private final java.lang.Runnable flush
private final java.lang.Runnable wakeup
Copyright © 2020 Spotify AB. All Rights Reserved.