Package io.netty.handler.ssl
Class SslHandler.SslHandlerCoalescingBufferQueue
- java.lang.Object
-
- io.netty.channel.AbstractCoalescingBufferQueue
-
- io.netty.handler.ssl.SslHandler.SslHandlerCoalescingBufferQueue
-
- Enclosing class:
- SslHandler
private final class SslHandler.SslHandlerCoalescingBufferQueue extends AbstractCoalescingBufferQueue
Each call to SSL_write will introduce about ~100 bytes of overhead. This coalescing queue attempts to increase goodput by aggregating the plaintext in chunks ofSslHandler.wrapDataSize
. If many small chunks are written this can increase goodput, decrease the amount of calls to SSL_write, and decrease overall encryption operations.
-
-
Constructor Summary
Constructors Constructor Description SslHandlerCoalescingBufferQueue(Channel channel, int initSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ByteBuf
compose(ByteBufAllocator alloc, ByteBuf cumulation, ByteBuf next)
Calculate the result ofcurrent + next
.protected ByteBuf
composeFirst(ByteBufAllocator allocator, ByteBuf first)
Calculate the firstByteBuf
which will be used in subsequent calls toAbstractCoalescingBufferQueue.compose(ByteBufAllocator, ByteBuf, ByteBuf)
.protected ByteBuf
removeEmptyValue()
The value to return whenAbstractCoalescingBufferQueue.remove(ByteBufAllocator, int, ChannelPromise)
is called but the queue is empty.-
Methods inherited from class io.netty.channel.AbstractCoalescingBufferQueue
add, add, add, addFirst, composeIntoComposite, copyAndCompose, copyTo, isEmpty, readableBytes, releaseAndFailAll, remove, removeFirst, size, toString, writeAndRemoveAll
-
-
-
-
Constructor Detail
-
SslHandlerCoalescingBufferQueue
SslHandlerCoalescingBufferQueue(Channel channel, int initSize)
-
-
Method Detail
-
compose
protected ByteBuf compose(ByteBufAllocator alloc, ByteBuf cumulation, ByteBuf next)
Description copied from class:AbstractCoalescingBufferQueue
Calculate the result ofcurrent + next
.- Specified by:
compose
in classAbstractCoalescingBufferQueue
-
composeFirst
protected ByteBuf composeFirst(ByteBufAllocator allocator, ByteBuf first)
Description copied from class:AbstractCoalescingBufferQueue
Calculate the firstByteBuf
which will be used in subsequent calls toAbstractCoalescingBufferQueue.compose(ByteBufAllocator, ByteBuf, ByteBuf)
.- Overrides:
composeFirst
in classAbstractCoalescingBufferQueue
-
removeEmptyValue
protected ByteBuf removeEmptyValue()
Description copied from class:AbstractCoalescingBufferQueue
The value to return whenAbstractCoalescingBufferQueue.remove(ByteBufAllocator, int, ChannelPromise)
is called but the queue is empty.- Specified by:
removeEmptyValue
in classAbstractCoalescingBufferQueue
- Returns:
- the
ByteBuf
which represents an empty queue.
-
-