Package org.infinispan.server.memcached
Class MemcachedServer
- java.lang.Object
-
- org.infinispan.server.core.AbstractCacheIgnoreAware
-
- org.infinispan.server.core.AbstractProtocolServer<MemcachedServerConfiguration>
-
- org.infinispan.server.memcached.MemcachedServer
-
- All Implemented Interfaces:
CacheIgnoreAware,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 Summary
Fields Modifier and Type Field Description protected ScheduledExecutorServicescheduler-
Fields inherited from class org.infinispan.server.core.AbstractProtocolServer
cacheManager, configuration, transport
-
-
Constructor Summary
Constructors Constructor Description MemcachedServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.netty.channel.ChannelInboundHandlergetDecoder()Gets the decoder for this protocol server.io.netty.channel.ChannelOutboundHandlergetEncoder()Gets the encoder for this protocol server.io.netty.channel.ChannelInitializer<io.netty.channel.Channel>getInitializer()Returns a pipeline factoryintgetWorkerThreads()protected voidstartInternal(MemcachedServerConfiguration configuration, EmbeddedCacheManager cacheManager)voidstop()Stops the server-
Methods inherited from class org.infinispan.server.core.AbstractProtocolServer
getCacheManager, getConfiguration, getExecutor, getHost, getPort, getQualifiedName, getTransport, getTransportStatus, isTransportEnabled, registerServerMBeans, start, startDefaultCache, startTransport, stopTransport, unregisterServerMBeans
-
Methods inherited from class org.infinispan.server.core.AbstractCacheIgnoreAware
ignoreCache, isCacheIgnored, setIgnoredCaches, unignore
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.server.core.CacheIgnoreAware
ignoreCache, isCacheIgnored, setIgnoredCaches, unignore
-
-
-
-
Field Detail
-
scheduler
protected ScheduledExecutorService scheduler
-
-
Method Detail
-
startInternal
protected void startInternal(MemcachedServerConfiguration configuration, EmbeddedCacheManager cacheManager)
- 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()
Description copied from interface:ProtocolServerGets the decoder for this protocol server. The decoder is responsible for reading client requests. This method cannot return null.
-
getInitializer
public io.netty.channel.ChannelInitializer<io.netty.channel.Channel> getInitializer()
Description copied from interface:ProtocolServerReturns a pipeline factory
-
stop
public void stop()
Description copied from interface:ProtocolServerStops the server- Specified by:
stopin interfaceProtocolServer<MemcachedServerConfiguration>- Overrides:
stopin classAbstractProtocolServer<MemcachedServerConfiguration>
-
getWorkerThreads
public int getWorkerThreads()
- Specified by:
getWorkerThreadsin classAbstractProtocolServer<MemcachedServerConfiguration>
-
-