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 aggregatesBinaryMemcacheMessage
s andMemcacheContent
intoFullBinaryMemcacheRequest
s orFullBinaryMemcacheResponse
s.
-
-
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 FullMemcacheMessage
beginAggregation(BinaryMemcacheMessage start, ByteBuf content)
Creates a new aggregated message from the specified start message and the specified content.protected boolean
isStartMessage(MemcacheObject msg)
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
-
-
-
-
Method Detail
-
isStartMessage
protected boolean isStartMessage(MemcacheObject msg) throws java.lang.Exception
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:
java.lang.Exception
-
beginAggregation
protected FullMemcacheMessage beginAggregation(BinaryMemcacheMessage start, ByteBuf content) throws java.lang.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:
java.lang.Exception
-
toFullRequest
private static FullBinaryMemcacheRequest toFullRequest(BinaryMemcacheRequest request, ByteBuf content)
-
toFullResponse
private static FullBinaryMemcacheResponse toFullResponse(BinaryMemcacheResponse response, ByteBuf content)
-
-