Class BinaryMemcacheObjectAggregator
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.handler.codec.MessageToMessageDecoder<I>
-
- io.netty.handler.codec.MessageAggregator<MemcacheObject,H,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 aggregatesBinaryMemcacheMessages andMemcacheContentintoFullBinaryMemcacheRequests orFullBinaryMemcacheResponses.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Constructor Summary
Constructors Constructor Description BinaryMemcacheObjectAggregator(int maxContentLength)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FullMemcacheMessagebeginAggregation(BinaryMemcacheMessage start, ByteBuf content)Creates a new aggregated message from the specified start message and the specified content.protected booleanisStartMessage(MemcacheObject msg)Returnstrueif and only if the specified message is a start message.private static FullBinaryMemcacheRequesttoFullRequest(BinaryMemcacheRequest request, ByteBuf content)private static FullBinaryMemcacheResponsetoFullResponse(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, 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
-
-
-
-
Method Detail
-
isStartMessage
protected boolean isStartMessage(MemcacheObject msg) throws java.lang.Exception
Description copied from class:MessageAggregatorReturnstrueif and only if the specified message is a start message. Typically, this method is implemented as a singlereturnstatement withinstanceof:return msg instanceof MyStartMessage;
- Specified by:
isStartMessagein classMessageAggregator<MemcacheObject,BinaryMemcacheMessage,MemcacheContent,FullMemcacheMessage>- Throws:
java.lang.Exception
-
beginAggregation
protected FullMemcacheMessage beginAggregation(BinaryMemcacheMessage start, ByteBuf content) throws java.lang.Exception
Description copied from class:MessageAggregatorCreates 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:
beginAggregationin classMessageAggregator<MemcacheObject,BinaryMemcacheMessage,MemcacheContent,FullMemcacheMessage>- Throws:
java.lang.Exception
-
toFullRequest
private static FullBinaryMemcacheRequest toFullRequest(BinaryMemcacheRequest request, ByteBuf content)
-
toFullResponse
private static FullBinaryMemcacheResponse toFullResponse(BinaryMemcacheResponse response, ByteBuf content)
-
-