Package org.infinispan.server.hotrod
Class HotRodServer
- java.lang.Object
-
- org.infinispan.server.core.AbstractCacheIgnoreAware
-
- org.infinispan.server.core.AbstractProtocolServer<HotRodServerConfiguration>
-
- org.infinispan.server.hotrod.HotRodServer
-
- All Implemented Interfaces:
CacheIgnoreAware
,ProtocolServer<HotRodServerConfiguration>
public class HotRodServer extends AbstractProtocolServer<HotRodServerConfiguration>
Hot Rod server, in charge of defining its encoder/decoder and, if clustered, update the topology information on startup and shutdown.- Since:
- 4.1
- Author:
- Galder ZamarreƱo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HotRodServer.CacheInfo
-
Field Summary
-
Fields inherited from class org.infinispan.server.core.AbstractProtocolServer
cacheManager, configuration, transport
-
-
Constructor Summary
Constructors Constructor Description HotRodServer()
-
Method Summary
-
Methods inherited from class org.infinispan.server.core.AbstractProtocolServer
getCacheManager, getConfiguration, getExecutor, getHost, getPort, getQualifiedName, getTransport, getTransportStatus, isTransportEnabled, registerServerMBeans, start, 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
-
-
-
-
Method Detail
-
getAddress
public ServerAddress getAddress()
-
getMarshaller
public org.infinispan.commons.marshall.Marshaller getMarshaller()
-
getClientListenerRegistry
public org.infinispan.server.hotrod.ClientListenerRegistry getClientListenerRegistry()
-
getClientCounterNotificationManager
public ClientCounterManagerNotificationManager getClientCounterNotificationManager()
-
getEncoder
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
public HotRodDecoder getDecoder()
Description copied from interface:ProtocolServer
Gets the decoder for this protocol server. The decoder is responsible for reading client requests. This method cannot return null.
-
startInternal
protected void startInternal(HotRodServerConfiguration configuration, EmbeddedCacheManager cacheManager)
- Overrides:
startInternal
in classAbstractProtocolServer<HotRodServerConfiguration>
-
getInitializer
public io.netty.channel.ChannelInitializer<io.netty.channel.Channel> getInitializer()
Description copied from interface:ProtocolServer
Returns a pipeline factory
-
startTransport
public void startTransport()
- Overrides:
startTransport
in classAbstractProtocolServer<HotRodServerConfiguration>
-
startDefaultCache
protected void startDefaultCache()
- Overrides:
startDefaultCache
in classAbstractProtocolServer<HotRodServerConfiguration>
-
createTopologyCacheConfig
protected ConfigurationBuilder createTopologyCacheConfig(long distSyncTimeout)
-
cache
public AdvancedCache<byte[],byte[]> cache(HotRodHeader header, Subject subject) throws org.infinispan.server.hotrod.RequestParsingException
- Throws:
org.infinispan.server.hotrod.RequestParsingException
-
cache
public AdvancedCache<byte[],byte[]> cache(HotRodHeader header, Subject subject, String cacheName) throws org.infinispan.server.hotrod.RequestParsingException
- Throws:
org.infinispan.server.hotrod.RequestParsingException
-
multimap
public EmbeddedMultimapCache<org.infinispan.commons.marshall.WrappedByteArray,org.infinispan.commons.marshall.WrappedByteArray> multimap(HotRodHeader header, Subject subject)
-
cacheStopped
public void cacheStopped(String cacheName)
-
getCacheInfo
public HotRodServer.CacheInfo getCacheInfo(AdvancedCache<byte[],byte[]> cache, HotRodHeader header)
-
getAddressCache
public Cache<Address,ServerAddress> getAddressCache()
-
addCacheEventFilterFactory
public void addCacheEventFilterFactory(String name, CacheEventFilterFactory factory)
-
removeCacheEventFilterFactory
public void removeCacheEventFilterFactory(String name)
-
addCacheEventConverterFactory
public void addCacheEventConverterFactory(String name, CacheEventConverterFactory factory)
-
removeCacheEventConverterFactory
public void removeCacheEventConverterFactory(String name)
-
addCacheEventFilterConverterFactory
public void addCacheEventFilterConverterFactory(String name, CacheEventFilterConverterFactory factory)
-
removeCacheEventFilterConverterFactory
public void removeCacheEventFilterConverterFactory(String name)
-
setMarshaller
public void setMarshaller(org.infinispan.commons.marshall.Marshaller marshaller)
-
addKeyValueFilterConverterFactory
public void addKeyValueFilterConverterFactory(String name, KeyValueFilterConverterFactory factory)
-
removeKeyValueFilterConverterFactory
public void removeKeyValueFilterConverterFactory(String name)
-
getIterationManager
public IterationManager getIterationManager()
-
stop
public void stop()
Description copied from interface:ProtocolServer
Stops the server- Specified by:
stop
in interfaceProtocolServer<HotRodServerConfiguration>
- Overrides:
stop
in classAbstractProtocolServer<HotRodServerConfiguration>
-
accessLogging
public HotRodAccessLogging accessLogging()
-
buildMetadata
public Metadata buildMetadata(HotRodHeader header, long lifespan, TimeUnitValue lifespanUnit, long maxIdle, TimeUnitValue maxIdleUnit)
-
getWorkerThreads
public int getWorkerThreads()
- Specified by:
getWorkerThreads
in classAbstractProtocolServer<HotRodServerConfiguration>
-
-