class BatchFlusher extends Object
GatheringByteChannel,
collapsing multiple writes into fewer syscalls.| Modifier and Type | Field and Description |
|---|---|
private io.netty.channel.Channel |
channel |
private static int |
DEFAULT_MAX_PENDING |
private io.netty.channel.EventLoop |
eventLoop |
private Runnable |
flush
Used to flush all outstanding writes in the outbound channel buffer.
|
private int |
maxPending |
private int |
pending |
private 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 AtomicIntegerFieldUpdater<BatchFlusher> |
WOKEN |
| Constructor and Description |
|---|
BatchFlusher(io.netty.channel.Channel channel) |
BatchFlusher(io.netty.channel.Channel channel,
int maxPending) |
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
Schedule an asynchronous opportunistically batching flush.
|
private static final int DEFAULT_MAX_PENDING
private final io.netty.channel.Channel channel
private final io.netty.channel.EventLoop eventLoop
private final int maxPending
private final AtomicIntegerFieldUpdater<BatchFlusher> WOKEN
private volatile int woken
private int pending
private final Runnable flush
private final Runnable wakeup
Copyright © 2017 Spotify AB. All Rights Reserved.