public interface FlushStrategy
| Modifier and Type | Field and Description |
|---|---|
static FlushStrategy |
DEFAULT
Default
FlushStrategy implementation. |
| Modifier and Type | Method and Description |
|---|---|
static FlushStrategy |
afterNumBytes(int bytes)
Implementation that flushes after a number of bytes.
|
static FlushStrategy |
afterNumPackets(int packets)
Implementation that flushes after a number of packets.
|
boolean |
shouldFlushNow(int numPackets,
int numBytes)
Returns
true if a flush should happen now, false otherwise. |
static final FlushStrategy DEFAULT
FlushStrategy implementation.boolean shouldFlushNow(int numPackets,
int numBytes)
true if a flush should happen now, false otherwise.numPackets - the number of packets that were written since the last flush.numBytes - the number of bytes that were written since the last flush.true if a flush should be done now, false otherwise.static FlushStrategy afterNumBytes(int bytes)
bytes - the number of bytes after which we should issue a flush.FlushStrategy.static FlushStrategy afterNumPackets(int packets)
packets - the number of packets after which we should issue a flush.FlushStrategy.Copyright © 2020–2021 The Netty Project. All rights reserved.