Package io.netty.handler.codec.quic
Interface FlushStrategy
-
public interface FlushStrategyAllows to configure a strategy for when flushes should be happening.
-
-
Field Summary
Fields Modifier and Type Field Description static FlushStrategyDEFAULTDefaultFlushStrategyimplementation.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static FlushStrategyafterNumBytes(int bytes)Implementation that flushes after a number of bytes.static FlushStrategyafterNumPackets(int packets)Implementation that flushes after a number of packets.booleanshouldFlushNow(int numPackets, int numBytes)Returnstrueif a flush should happen now,falseotherwise.
-
-
-
Field Detail
-
DEFAULT
static final FlushStrategy DEFAULT
DefaultFlushStrategyimplementation.
-
-
Method Detail
-
shouldFlushNow
boolean shouldFlushNow(int numPackets, int numBytes)Returnstrueif a flush should happen now,falseotherwise.- Parameters:
numPackets- the number of packets that were written since the last flush.numBytes- the number of bytes that were written since the last flush.- Returns:
trueif a flush should be done now,falseotherwise.
-
afterNumBytes
static FlushStrategy afterNumBytes(int bytes)
Implementation that flushes after a number of bytes.- Parameters:
bytes- the number of bytes after which we should issue a flush.- Returns:
- the
FlushStrategy.
-
afterNumPackets
static FlushStrategy afterNumPackets(int packets)
Implementation that flushes after a number of packets.- Parameters:
packets- the number of packets after which we should issue a flush.- Returns:
- the
FlushStrategy.
-
-