Class BinaryMemcacheObjectAggregator
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.handler.codec.MessageToMessageDecoder<MemcacheObject>
io.netty.handler.codec.MessageAggregator<MemcacheObject,BinaryMemcacheMessage,MemcacheContent,FullMemcacheMessage>
io.netty.handler.codec.memcache.AbstractMemcacheObjectAggregator<BinaryMemcacheMessage>
io.netty.handler.codec.memcache.binary.BinaryMemcacheObjectAggregator
- All Implemented Interfaces:
ChannelHandler
,ChannelInboundHandler
@UnstableApi
public class BinaryMemcacheObjectAggregator
extends AbstractMemcacheObjectAggregator<BinaryMemcacheMessage>
An object aggregator for the memcache binary protocol.
It aggregates
BinaryMemcacheMessage
s and MemcacheContent
into FullBinaryMemcacheRequest
s
or FullBinaryMemcacheResponse
s.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FullMemcacheMessage
beginAggregation
(BinaryMemcacheMessage start, ByteBuf content) Creates a new aggregated message from the specified start message and the specified content.protected boolean
Returnstrue
if and only if the specified message is a start message.private static FullBinaryMemcacheRequest
toFullRequest
(BinaryMemcacheRequest request, ByteBuf content) private static FullBinaryMemcacheResponse
toFullResponse
(BinaryMemcacheResponse response, ByteBuf content) Methods inherited from class io.netty.handler.codec.memcache.AbstractMemcacheObjectAggregator
closeAfterContinueResponse, ignoreContentAfterContinueResponse, isAggregated, isContentLengthInvalid, isContentMessage, isLastContentMessage, newContinueResponse
Methods inherited from class io.netty.handler.codec.MessageAggregator
acceptInboundMessage, aggregate, channelInactive, channelReadComplete, ctx, decode, finishAggregation, handleOversizedMessage, handlerAdded, handlerRemoved, isHandlingOversizedMessage, maxContentLength, maxCumulationBufferComponents, releaseCurrentMessage, setMaxCumulationBufferComponents
Methods inherited from class io.netty.handler.codec.MessageToMessageDecoder
channelRead
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharable
-
Constructor Details
-
BinaryMemcacheObjectAggregator
public BinaryMemcacheObjectAggregator(int maxContentLength)
-
-
Method Details
-
isStartMessage
Description copied from class:MessageAggregator
Returnstrue
if and only if the specified message is a start message. Typically, this method is implemented as a singlereturn
statement withinstanceof
:return msg instanceof MyStartMessage;
- Specified by:
isStartMessage
in classMessageAggregator<MemcacheObject,
BinaryMemcacheMessage, MemcacheContent, FullMemcacheMessage> - Throws:
Exception
-
beginAggregation
protected FullMemcacheMessage beginAggregation(BinaryMemcacheMessage start, ByteBuf content) throws Exception Description copied from class:MessageAggregator
Creates a new aggregated message from the specified start message and the specified content. If the start message implementsByteBufHolder
, its content is appended to the specifiedcontent
. This aggregator will continue to append the received content to the specifiedcontent
.- Specified by:
beginAggregation
in classMessageAggregator<MemcacheObject,
BinaryMemcacheMessage, MemcacheContent, FullMemcacheMessage> - Throws:
Exception
-
toFullRequest
private static FullBinaryMemcacheRequest toFullRequest(BinaryMemcacheRequest request, ByteBuf content) -
toFullResponse
private static FullBinaryMemcacheResponse toFullResponse(BinaryMemcacheResponse response, ByteBuf content)
-