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 classHotRodServer.CacheInfo
-
Field Summary
Fields Modifier and Type Field Description static intLISTENERS_CHECK_INTERVAL-
Fields inherited from class org.infinispan.server.core.AbstractProtocolServer
cacheManager, configuration, transport
-
-
Constructor Summary
Constructors Constructor Description HotRodServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.infinispan.server.hotrod.logging.HotRodAccessLoggingaccessLogging()voidaddCacheEventConverterFactory(java.lang.String name, CacheEventConverterFactory factory)voidaddCacheEventFilterConverterFactory(java.lang.String name, CacheEventFilterConverterFactory factory)voidaddCacheEventFilterFactory(java.lang.String name, CacheEventFilterFactory factory)voidaddKeyValueFilterConverterFactory(java.lang.String name, KeyValueFilterConverterFactory factory)Metadata.BuilderbuildMetadata(long lifespan, TimeUnitValue lifespanUnit, long maxIdle, TimeUnitValue maxIdleUnit)AdvancedCache<byte[],byte[]>cache(HotRodServer.CacheInfo cacheInfo, HotRodHeader header, javax.security.auth.Subject subject)protected ConfigurationBuildercreateTopologyCacheConfig(long distSyncTimeout)ServerAddressgetAddress()Cache<Address,ServerAddress>getAddressCache()HotRodServer.CacheInfogetCacheInfo(java.lang.String cacheName, byte hotRodVersion, long messageId, boolean checkIgnored)HotRodServer.CacheInfogetCacheInfo(HotRodHeader header)ClientCounterManagerNotificationManagergetClientCounterNotificationManager()org.infinispan.server.hotrod.ClientListenerRegistrygetClientListenerRegistry()HotRodDecodergetDecoder()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 factoryIterationManagergetIterationManager()MarshallergetMarshaller()intgetWorkerThreads()org.infinispan.multimap.impl.EmbeddedMultimapCache<WrappedByteArray,WrappedByteArray>multimap(HotRodHeader header, javax.security.auth.Subject subject)voidremoveCacheEventConverterFactory(java.lang.String name)voidremoveCacheEventFilterConverterFactory(java.lang.String name)voidremoveCacheEventFilterFactory(java.lang.String name)voidremoveKeyValueFilterConverterFactory(java.lang.String name)voidsetMarshaller(Marshaller marshaller)protected voidstartDefaultCache()protected voidstartInternal(HotRodServerConfiguration configuration, EmbeddedCacheManager cacheManager)protected voidstartTransport()voidstop()Stops the serverjava.lang.StringtoString()voidupdateCacheInfo(HotRodServer.CacheInfo info)-
Methods inherited from class org.infinispan.server.core.AbstractProtocolServer
defaultCacheName, getCacheManager, getConfiguration, getExecutor, getHost, getName, getPort, getQualifiedName, getTransport, isTransportEnabled, registerServerMBeans, start, 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, wait, wait, wait
-
Methods inherited from interface org.infinispan.server.core.CacheIgnoreAware
ignoreCache, isCacheIgnored, setIgnoredCaches, unignore
-
-
-
-
Field Detail
-
LISTENERS_CHECK_INTERVAL
public static final int LISTENERS_CHECK_INTERVAL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAddress
public ServerAddress getAddress()
-
getMarshaller
public 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: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 HotRodDecoder 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.
-
startInternal
protected void startInternal(HotRodServerConfiguration configuration, EmbeddedCacheManager cacheManager)
- Overrides:
startInternalin classAbstractProtocolServer<HotRodServerConfiguration>
-
getInitializer
public io.netty.channel.ChannelInitializer<io.netty.channel.Channel> getInitializer()
Description copied from interface:ProtocolServerReturns a pipeline factory
-
startTransport
protected void startTransport()
- Overrides:
startTransportin classAbstractProtocolServer<HotRodServerConfiguration>
-
startDefaultCache
protected void startDefaultCache()
- Overrides:
startDefaultCachein classAbstractProtocolServer<HotRodServerConfiguration>
-
createTopologyCacheConfig
protected ConfigurationBuilder createTopologyCacheConfig(long distSyncTimeout)
-
cache
public AdvancedCache<byte[],byte[]> cache(HotRodServer.CacheInfo cacheInfo, HotRodHeader header, javax.security.auth.Subject subject)
-
multimap
public org.infinispan.multimap.impl.EmbeddedMultimapCache<WrappedByteArray,WrappedByteArray> multimap(HotRodHeader header, javax.security.auth.Subject subject)
-
getCacheInfo
public HotRodServer.CacheInfo getCacheInfo(HotRodHeader header)
-
getCacheInfo
public HotRodServer.CacheInfo getCacheInfo(java.lang.String cacheName, byte hotRodVersion, long messageId, boolean checkIgnored)
-
updateCacheInfo
public void updateCacheInfo(HotRodServer.CacheInfo info)
-
getAddressCache
public Cache<Address,ServerAddress> getAddressCache()
-
addCacheEventFilterFactory
public void addCacheEventFilterFactory(java.lang.String name, CacheEventFilterFactory factory)
-
removeCacheEventFilterFactory
public void removeCacheEventFilterFactory(java.lang.String name)
-
addCacheEventConverterFactory
public void addCacheEventConverterFactory(java.lang.String name, CacheEventConverterFactory factory)
-
removeCacheEventConverterFactory
public void removeCacheEventConverterFactory(java.lang.String name)
-
addCacheEventFilterConverterFactory
public void addCacheEventFilterConverterFactory(java.lang.String name, CacheEventFilterConverterFactory factory)
-
removeCacheEventFilterConverterFactory
public void removeCacheEventFilterConverterFactory(java.lang.String name)
-
setMarshaller
public void setMarshaller(Marshaller marshaller)
-
addKeyValueFilterConverterFactory
public void addKeyValueFilterConverterFactory(java.lang.String name, KeyValueFilterConverterFactory factory)
-
removeKeyValueFilterConverterFactory
public void removeKeyValueFilterConverterFactory(java.lang.String name)
-
getIterationManager
public IterationManager getIterationManager()
-
stop
public void stop()
Description copied from interface:ProtocolServerStops the server- Specified by:
stopin interfaceProtocolServer<HotRodServerConfiguration>- Overrides:
stopin classAbstractProtocolServer<HotRodServerConfiguration>
-
accessLogging
public org.infinispan.server.hotrod.logging.HotRodAccessLogging accessLogging()
-
buildMetadata
public Metadata.Builder buildMetadata(long lifespan, TimeUnitValue lifespanUnit, long maxIdle, TimeUnitValue maxIdleUnit)
-
getWorkerThreads
public int getWorkerThreads()
- Specified by:
getWorkerThreadsin classAbstractProtocolServer<HotRodServerConfiguration>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-