Package org.infinispan.server.memcached
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.Cumulator
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final boolean
protected static final Subject
protected final AdvancedCache
<byte[], byte[]> protected io.netty.channel.ChannelHandlerContext
protected final ByRef
<MemcachedResponse> protected static final Log
protected final String
protected Temporal
protected final MemcachedServer
protected final MemcachedStats
protected final boolean
protected final Subject
protected final TimeService
protected final VersionGenerator
Fields inherited from class io.netty.handler.codec.ByteToMessageDecoder
COMPOSITE_CUMULATOR, MERGE_CUMULATOR
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
MemcachedBaseDecoder
(MemcachedServer server, Subject subject, AdvancedCache<byte[], byte[]> cache) -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
exceptionCaught
(Header header, Throwable t) protected abstract MemcachedResponse
failedResponse
(Header header, Throwable t) void
handlerAdded
(io.netty.channel.ChannelHandlerContext ctx) protected Metadata
metadata
(int flags, int expiration) void
registerExceptionHandler
(BiConsumer<io.netty.channel.ChannelHandlerContext, MemcachedResponse> handler) void
protected abstract MemcachedResponse
send
(Header header, CompletionStage<?> response) protected abstract MemcachedResponse
send
(Header header, CompletionStage<?> response, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> listener) protected Map
<byte[], byte[]> statsMap()
protected long
toMillis
(int lifespan) protected Metadata
touchMetadata
(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, userEventTriggered
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
Methods 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
-
-
Constructor Details
-
MemcachedBaseDecoder
protected MemcachedBaseDecoder(MemcachedServer server, Subject subject, AdvancedCache<byte[], byte[]> cache)
-
-
Method Details
-
registerExceptionHandler
public void registerExceptionHandler(BiConsumer<io.netty.channel.ChannelHandlerContext, MemcachedResponse> handler) -
exceptionCaught
-
handlerAdded
- Specified by:
handlerAdded
in interfaceio.netty.channel.ChannelHandler
- Overrides:
handlerAdded
in classio.netty.channel.ChannelHandlerAdapter
- Throws:
Exception
-
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
-