Class MemcachedServer

All Implemented Interfaces:
AutoCloseable, ProtocolServer<MemcachedServerConfiguration>

public class MemcachedServer extends AbstractProtocolServer<MemcachedServerConfiguration>
Memcached server defining its decoder/encoder settings. In fact, Memcached does not use an encoder since there's no really common headers between protocol operations.
Since:
4.1
Author:
Galder Zamarreño
  • Field Details Link icon

  • Constructor Details Link icon

    • MemcachedServer Link icon

      public MemcachedServer()
  • Method Details Link icon

    • startInternal Link icon

      protected void startInternal()
      Overrides:
      startInternal in class AbstractProtocolServer<MemcachedServerConfiguration>
    • getEncoder Link icon

      public io.netty.channel.ChannelOutboundHandler getEncoder()
      Description copied from interface: ProtocolServer
      Gets the encoder for this protocol server. The encoder is responsible for writing back common header responses back to client. This method can return null if the server has no encoder. You can find an example of the server that has no encoder in the Memcached server.
    • getDecoder Link icon

      public io.netty.channel.ChannelInboundHandler getDecoder()
      Invoked when the Memcached server has a dedicated transport
    • getDecoder Link icon

      public io.netty.channel.ChannelInboundHandler getDecoder(MemcachedProtocol protocol)
      Invoked when the Memcached server is part of a single-port router
    • installMemcachedInboundHandler Link icon

      public void installMemcachedInboundHandler(io.netty.channel.Channel ch, MemcachedBaseDecoder decoder)
    • getChannelMatcher Link icon

      public io.netty.channel.group.ChannelMatcher getChannelMatcher()
      Description copied from interface: ProtocolServer
      Returns a ChannelMatcher which matches channels which belong to this protocol server
    • getInitializer Link icon

      public io.netty.channel.ChannelInitializer<io.netty.channel.Channel> getInitializer()
      Description copied from interface: ProtocolServer
      Returns a pipeline factory
    • getInitializer Link icon

      public io.netty.channel.ChannelInitializer<io.netty.channel.Channel> getInitializer(MemcachedProtocol protocol)
      This initializer is invoked by the detector
    • stop Link icon

      public void stop()
      Description copied from interface: ProtocolServer
      Stops the server.
      Specified by:
      stop in interface ProtocolServer<MemcachedServerConfiguration>
      Overrides:
      stop in class AbstractProtocolServer<MemcachedServerConfiguration>
    • getCache Link icon

      public Cache<Object,Object> getCache()
      Returns the cache being used by the Memcached server
    • getScheduler Link icon

      public ScheduledExecutorService getScheduler()
    • installDetector Link icon

      public void installDetector(io.netty.channel.Channel ch)
      Description copied from interface: ProtocolServer
      Installs a protocol detector on the channel
      Parameters:
      ch -
    • getStatistics Link icon

      public MemcachedStats getStatistics()