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
BinaryMemcacheMessages and MemcacheContent into FullBinaryMemcacheRequests
or FullBinaryMemcacheResponses.-
Nested Class Summary
Nested classes/interfaces inherited from interface ChannelHandler
ChannelHandler.Sharable -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FullMemcacheMessagebeginAggregation(BinaryMemcacheMessage start, ByteBuf content) Creates a new aggregated message from the specified start message and the specified content.protected booleanReturnstrueif 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 AbstractMemcacheObjectAggregator
closeAfterContinueResponse, ignoreContentAfterContinueResponse, isAggregated, isContentLengthInvalid, isContentMessage, isLastContentMessage, newContinueResponseMethods inherited from class MessageAggregator
acceptInboundMessage, aggregate, channelInactive, channelReadComplete, ctx, decode, finishAggregation, handleOversizedMessage, handlerAdded, handlerRemoved, isHandlingOversizedMessage, maxContentLength, maxCumulationBufferComponents, releaseCurrentMessage, setMaxCumulationBufferComponentsMethods inherited from class MessageToMessageDecoder
channelReadMethods inherited from class ChannelInboundHandlerAdapter
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredMethods inherited from class ChannelHandlerAdapter
ensureNotSharable, isSharable
-
Constructor Details
-
BinaryMemcacheObjectAggregator
public BinaryMemcacheObjectAggregator(int maxContentLength)
-
-
Method Details
-
isStartMessage
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:
Exception
-
beginAggregation
protected FullMemcacheMessage beginAggregation(BinaryMemcacheMessage start, ByteBuf content) throws 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:
Exception
-
toFullRequest
private static FullBinaryMemcacheRequest toFullRequest(BinaryMemcacheRequest request, ByteBuf content) -
toFullResponse
private static FullBinaryMemcacheResponse toFullResponse(BinaryMemcacheResponse response, ByteBuf content)
-