Class HotRodServer
java.lang.Object
org.infinispan.server.core.AbstractProtocolServer<HotRodServerConfiguration>
org.infinispan.server.hotrod.HotRodServer
- All Implemented Interfaces:
AutoCloseable,ProtocolServer<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 -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intFields inherited from class org.infinispan.server.core.AbstractProtocolServer
adminEndpoint, cacheManager, configuration, server, transport -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCacheEventConverterFactory(String name, CacheEventConverterFactory factory) voidvoidaddCacheEventFilterFactory(String name, CacheEventFilterFactory factory) voidbuildMetadata(long lifespan, TimeUnitValue lifespanUnit, long maxIdle, TimeUnitValue maxIdleUnit) buildMetadata2x(long lifespan, TimeUnitValue lifespanUnit, long maxIdle, TimeUnitValue maxIdleUnit) AdvancedCache<byte[], byte[]> cache(HotRodServer.ExtendedCacheInfo cacheInfo, HotRodHeader header, Subject subject) protected ConfigurationBuildercreateTopologyCacheConfig(long distSyncTimeout) getCacheInfo(String cacheName, byte hotRodVersion, long messageId, boolean checkIgnored) getCacheInfo(HotRodHeader header) io.netty.channel.group.ChannelMatcherReturns aChannelMatcherwhich matches channels which belong to this protocol serverorg.infinispan.server.hotrod.ClientListenerRegistryGets the decoder for this protocol server.io.netty.channel.ChannelOutboundHandlerGets the encoder for this protocol server.io.netty.channel.ChannelInitializer<io.netty.channel.Channel> Returns a pipeline factorybooleanvoidinstallDetector(io.netty.channel.Channel ch) Installs a protocol detector on the channelvoidEmbeddedMultimapCache<byte[], byte[]> multimap(HotRodHeader header, Subject subject, boolean supportsDuplicates) voidvoidvoidvoidvoidsetMarshaller(Marshaller marshaller) protected voidprotected voidprotected voidvoidstop()Stops the server.toString()voidMethods inherited from class org.infinispan.server.core.AbstractProtocolServer
defaultCacheName, getBlockingManager, getCacheManager, getConfiguration, getEnclosingProtocolServer, getExecutor, getHost, getName, getPort, getQualifiedName, getServerStateManager, getTransport, isCacheIgnored, isTransportEnabled, postStart, registerMetrics, registerServerMBeans, setEnclosingProtocolServer, setServerManagement, start, unregisterMetrics, unregisterServerMBeansMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.infinispan.server.core.ProtocolServer
close
-
Field Details
-
DEFAULT_HOTROD_PORT
public static final int DEFAULT_HOTROD_PORT- See Also:
-
LISTENERS_CHECK_INTERVAL
public static final int LISTENERS_CHECK_INTERVAL- See Also:
-
-
Constructor Details
-
HotRodServer
public HotRodServer()
-
-
Method Details
-
hasDefaultCache
public boolean hasDefaultCache() -
getAddress
-
getMarshaller
-
getTimeService
-
getClientListenerRegistry
public org.infinispan.server.hotrod.ClientListenerRegistry getClientListenerRegistry() -
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
Description copied from interface:ProtocolServerGets the decoder for this protocol server. The decoder is responsible for reading client requests. This method cannot return null. -
getChannelMatcher
public io.netty.channel.group.ChannelMatcher getChannelMatcher()Description copied from interface:ProtocolServerReturns aChannelMatcherwhich matches channels which belong to this protocol server -
installDetector
public void installDetector(io.netty.channel.Channel ch) Description copied from interface:ProtocolServerInstalls a protocol detector on the channel- Parameters:
ch-
-
startInternal
protected void startInternal()- Overrides:
startInternalin classAbstractProtocolServer<HotRodServerConfiguration>
-
internalPostStart
public void internalPostStart()- Overrides:
internalPostStartin 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>
-
startCaches
protected void startCaches()- Overrides:
startCachesin classAbstractProtocolServer<HotRodServerConfiguration>
-
createTopologyCacheConfig
-
cache
public AdvancedCache<byte[],byte[]> cache(HotRodServer.ExtendedCacheInfo cacheInfo, HotRodHeader header, Subject subject) -
multimap
public EmbeddedMultimapCache<byte[],byte[]> multimap(HotRodHeader header, Subject subject, boolean supportsDuplicates) -
getCacheInfo
-
getCacheInfo
public HotRodServer.ExtendedCacheInfo getCacheInfo(String cacheName, byte hotRodVersion, long messageId, boolean checkIgnored) -
updateCacheInfo
-
getAddressCache
-
addCacheEventFilterFactory
-
removeCacheEventFilterFactory
-
addCacheEventConverterFactory
-
removeCacheEventConverterFactory
-
addCacheEventFilterConverterFactory
public void addCacheEventFilterConverterFactory(String name, CacheEventFilterConverterFactory factory) -
removeCacheEventFilterConverterFactory
-
setMarshaller
-
addKeyValueFilterConverterFactory
-
removeKeyValueFilterConverterFactory
-
getIterationManager
-
getStreamingManager
-
stop
public void stop()Description copied from interface:ProtocolServerStops the server.- Specified by:
stopin interfaceProtocolServer<HotRodServerConfiguration>- Overrides:
stopin classAbstractProtocolServer<HotRodServerConfiguration>
-
accessLogging
-
buildMetadata2x
public Metadata.Builder buildMetadata2x(long lifespan, TimeUnitValue lifespanUnit, long maxIdle, TimeUnitValue maxIdleUnit) -
buildMetadata
public Metadata.Builder buildMetadata(long lifespan, TimeUnitValue lifespanUnit, long maxIdle, TimeUnitValue maxIdleUnit) -
toString
-