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

    Fields
    Modifier and Type
    Field
    Description
    protected final boolean
     
    protected static final Subject
     
    protected final org.infinispan.AdvancedCache<byte[],byte[]>
     
    protected io.netty.channel.ChannelHandlerContext
     
    protected final org.infinispan.commons.util.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 org.infinispan.commons.time.TimeService
     
    protected final org.infinispan.container.versioning.VersionGenerator
     

    Fields inherited from class io.netty.handler.codec.ByteToMessageDecoder

    COMPOSITE_CUMULATOR, MERGE_CUMULATOR
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    MemcachedBaseDecoder(MemcachedServer server, Subject subject, org.infinispan.AdvancedCache<byte[],byte[]> cache)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final void
     
    protected abstract MemcachedResponse
     
    void
    handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
     
    protected org.infinispan.metadata.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[]>
     
    protected long
    toMillis(int lifespan)
     
    protected org.infinispan.metadata.Metadata
    touchMetadata(org.infinispan.container.entries.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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ANONYMOUS

      protected static final Subject ANONYMOUS
    • log

      protected static final Log log
    • server

      protected final MemcachedServer server
    • statistics

      protected final MemcachedStats statistics
    • statsEnabled

      protected final boolean statsEnabled
    • accessLogging

      protected final boolean accessLogging
    • requestStart

      protected Temporal requestStart
    • ctx

      protected io.netty.channel.ChannelHandlerContext ctx
    • timeService

      protected final org.infinispan.commons.time.TimeService timeService
    • versionGenerator

      protected final org.infinispan.container.versioning.VersionGenerator versionGenerator
    • cache

      protected final org.infinispan.AdvancedCache<byte[],byte[]> cache
    • subject

      protected final Subject subject
    • principalName

      protected final String principalName
    • current

      protected final org.infinispan.commons.util.ByRef<MemcachedResponse> current
  • Constructor Details

    • MemcachedBaseDecoder

      protected MemcachedBaseDecoder(MemcachedServer server, Subject subject, org.infinispan.AdvancedCache<byte[],byte[]> cache)
  • Method Details

    • registerExceptionHandler

      public void registerExceptionHandler(BiConsumer<io.netty.channel.ChannelHandlerContext,MemcachedResponse> handler)
    • exceptionCaught

      protected final void exceptionCaught(Header header, Throwable t)
    • handlerAdded

      public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      handlerAdded in interface io.netty.channel.ChannelHandler
      Overrides:
      handlerAdded in class io.netty.channel.ChannelHandlerAdapter
      Throws:
      Exception
    • resumeRead

      public void resumeRead()
    • failedResponse

      protected abstract MemcachedResponse failedResponse(Header header, Throwable t)
    • send

      protected abstract MemcachedResponse send(Header header, CompletionStage<?> response)
    • send

      protected abstract MemcachedResponse send(Header header, CompletionStage<?> response, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> listener)
    • statsMap

      protected Map<byte[],byte[]> statsMap()
    • touchMetadata

      protected org.infinispan.metadata.Metadata touchMetadata(org.infinispan.container.entries.CacheEntry<?,?> entry, int expiration)
    • toMillis

      protected long toMillis(int lifespan)
    • metadata

      protected org.infinispan.metadata.Metadata metadata(int flags, int expiration)