Class MemcachedBaseDecoder
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.handler.codec.ByteToMessageDecoder
org.infinispan.server.memcached.MemcachedBaseDecoder
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
- Direct Known Subclasses:
BinaryAuthDecoderImpl,BinaryOpDecoderImpl,TextAuthDecoder,TextOpDecoder
public abstract class MemcachedBaseDecoder
extends io.netty.handler.codec.ByteToMessageDecoder
- Since:
- 15.0
-
Nested Class Summary
Nested classes/interfaces inherited from class io.netty.handler.codec.ByteToMessageDecoder
io.netty.handler.codec.ByteToMessageDecoder.CumulatorNested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected static final Subjectprotected final AdvancedCache<byte[], byte[]> protected io.netty.channel.ChannelHandlerContextprotected final ByRef<MemcachedResponse> protected static final Logprotected final intprotected intprotected final Stringprotected Temporalprotected final MemcachedServerprotected final MemcachedStatsprotected final booleanprotected final Subjectprotected final TimeServiceprotected final VersionGeneratorFields inherited from class io.netty.handler.codec.ByteToMessageDecoder
COMPOSITE_CUMULATOR, MERGE_CUMULATOR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMemcachedBaseDecoder(MemcachedServer server, Subject subject, AdvancedCache<byte[], byte[]> cache) -
Method Summary
Modifier and TypeMethodDescriptionprotected intbytesAvailable(io.netty.buffer.ByteBuf buf, int requestBytes) protected final voidexceptionCaught(Header header, Throwable t) protected abstract MemcachedResponsefailedResponse(Header header, Throwable t) voidhandlerAdded(io.netty.channel.ChannelHandlerContext ctx) protected Metadatametadata(int flags, int expiration) voidregisterExceptionHandler(BiConsumer<io.netty.channel.ChannelHandlerContext, MemcachedResponse> handler) voidprotected abstract MemcachedResponsesend(Header header, CompletionStage<?> response) protected abstract MemcachedResponsesend(Header header, CompletionStage<?> response, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> listener) protected Map<byte[], byte[]> statsMap()protected longtoMillis(int lifespan) protected MetadatatouchMetadata(CacheEntry<?, ?> entry, int expiration) Methods inherited from class io.netty.handler.codec.ByteToMessageDecoder
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decode, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggeredMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharable
-
Field Details
-
ANONYMOUS
-
log
-
server
-
statistics
-
statsEnabled
protected final boolean statsEnabled -
accessLogging
protected final boolean accessLogging -
requestStart
-
ctx
protected io.netty.channel.ChannelHandlerContext ctx -
timeService
-
versionGenerator
-
cache
-
subject
-
principalName
-
current
-
maxContentLength
protected final int maxContentLength -
posBefore
protected int posBefore
-
-
Constructor Details
-
MemcachedBaseDecoder
protected MemcachedBaseDecoder(MemcachedServer server, Subject subject, AdvancedCache<byte[], byte[]> cache)
-
-
Method Details
-
bytesAvailable
protected int bytesAvailable(io.netty.buffer.ByteBuf buf, int requestBytes) -
registerExceptionHandler
public void registerExceptionHandler(BiConsumer<io.netty.channel.ChannelHandlerContext, MemcachedResponse> handler) -
exceptionCaught
-
handlerAdded
-
resumeRead
public void resumeRead() -
failedResponse
-
send
-
send
protected abstract MemcachedResponse send(Header header, CompletionStage<?> response, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> listener) -
statsMap
-
touchMetadata
-
toMillis
protected long toMillis(int lifespan) -
metadata
-