Class MemcachedServer
java.lang.Object
org.infinispan.server.core.AbstractProtocolServer<MemcachedServerConfiguration>
org.infinispan.server.memcached.MemcachedServer
- All Implemented Interfaces:
AutoCloseable,ProtocolServer<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 Summary
FieldsFields inherited from class org.infinispan.server.core.AbstractProtocolServer
adminEndpoint, cacheManager, configuration, server, transport -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCache()Returns the cache being used by the Memcached serverio.netty.channel.group.ChannelMatcherReturns aChannelMatcherwhich matches channels which belong to this protocol serverio.netty.channel.ChannelInboundHandlerInvoked when the Memcached server has a dedicated transportio.netty.channel.ChannelInboundHandlergetDecoder(MemcachedProtocol protocol) Invoked when the Memcached server is part of a single-port routerio.netty.channel.ChannelOutboundHandlerGets the encoder for this protocol server.io.netty.channel.ChannelInitializer<io.netty.channel.Channel> Returns a pipeline factoryio.netty.channel.ChannelInitializer<io.netty.channel.Channel> getInitializer(MemcachedProtocol protocol) This initializer is invoked by the detectorvoidinstallDetector(io.netty.channel.Channel ch) Installs a protocol detector on the channelvoidinstallMemcachedInboundHandler(io.netty.channel.Channel ch, MemcachedBaseDecoder decoder) protected voidvoidstop()Stops the server.Methods inherited from class org.infinispan.server.core.AbstractProtocolServer
defaultCacheName, getBlockingManager, getCacheManager, getConfiguration, getEnclosingProtocolServer, getExecutor, getHost, getName, getPort, getQualifiedName, getServerStateManager, getTransport, internalPostStart, isCacheIgnored, isTransportEnabled, postStart, registerMetrics, registerServerMBeans, setEnclosingProtocolServer, setServerManagement, start, startCaches, startTransport, unregisterMetrics, unregisterServerMBeansMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.server.core.ProtocolServer
close
-
Field Details
-
scheduler
-
-
Constructor Details
-
MemcachedServer
public MemcachedServer()
-
-
Method Details
-
startInternal
protected void startInternal()- Overrides:
startInternalin classAbstractProtocolServer<MemcachedServerConfiguration>
-
getEncoder
public io.netty.channel.ChannelOutboundHandler getEncoder()Description copied from interface:ProtocolServerGets 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
public io.netty.channel.ChannelInboundHandler getDecoder()Invoked when the Memcached server has a dedicated transport -
getDecoder
Invoked when the Memcached server is part of a single-port router -
installMemcachedInboundHandler
public void installMemcachedInboundHandler(io.netty.channel.Channel ch, MemcachedBaseDecoder decoder) -
getChannelMatcher
public io.netty.channel.group.ChannelMatcher getChannelMatcher()Description copied from interface:ProtocolServerReturns aChannelMatcherwhich matches channels which belong to this protocol server -
getInitializer
public io.netty.channel.ChannelInitializer<io.netty.channel.Channel> getInitializer()Description copied from interface:ProtocolServerReturns a pipeline factory -
getInitializer
public io.netty.channel.ChannelInitializer<io.netty.channel.Channel> getInitializer(MemcachedProtocol protocol) This initializer is invoked by the detector -
stop
public void stop()Description copied from interface:ProtocolServerStops the server.- Specified by:
stopin interfaceProtocolServer<MemcachedServerConfiguration>- Overrides:
stopin classAbstractProtocolServer<MemcachedServerConfiguration>
-
getCache
-
getScheduler
-
installDetector
public void installDetector(io.netty.channel.Channel ch) Description copied from interface:ProtocolServerInstalls a protocol detector on the channel- Parameters:
ch-
-
getStatistics
-