T - The message typepublic final class PendingMessages<T extends io.netty.util.ReferenceCounted>
extends java.lang.Object
| Constructor and Description |
|---|
PendingMessages(int maxMessages,
int maxBytes,
java.util.function.ToIntFunction<? super T> size) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Releases every message held.
|
boolean |
offer(T message)
Holds a message, taking ownership of it.
|
T |
poll() |
public PendingMessages(int maxMessages,
int maxBytes,
java.util.function.ToIntFunction<? super T> size)
maxMessages - Most messages held at oncemaxBytes - Most bytes held at oncesize - How many bytes a message counts for, the same for as long as it is heldpublic boolean offer(T message)
message - The message to holdpublic T poll()
public void clear()