Package org.infinispan.server.core
Class AbstractProtocolServer<A extends ProtocolServerConfiguration>
- java.lang.Object
-
- org.infinispan.server.core.AbstractCacheIgnoreAware
-
- org.infinispan.server.core.AbstractProtocolServer<A>
-
- All Implemented Interfaces:
CacheIgnoreAware,ProtocolServer<A>
- Direct Known Subclasses:
HotRodServer,MemcachedServer,RestServer
public abstract class AbstractProtocolServer<A extends ProtocolServerConfiguration> extends AbstractCacheIgnoreAware implements ProtocolServer<A>
A common protocol server dealing with common property parameter validation and assignment and transport lifecycle.- Since:
- 4.1
- Author:
- Galder ZamarreƱo, wburns
-
-
Field Summary
Fields Modifier and Type Field Description protected EmbeddedCacheManagercacheManagerprotected Aconfigurationprotected NettyTransporttransport
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractProtocolServer(java.lang.String protocolName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description EmbeddedCacheManagergetCacheManager()AgetConfiguration()Returns the configuration used to start this serverprotected java.util.concurrent.ThreadPoolExecutorgetExecutor()java.lang.StringgetHost()java.lang.IntegergetPort()java.lang.StringgetQualifiedName()NettyTransportgetTransport()abstract intgetWorkerThreads()Deprecated.Use thegetExecutor()to obtain information about the worker executor insteadbooleanisTransportEnabled()protected voidregisterServerMBeans()voidstart(A configuration, EmbeddedCacheManager cacheManager)Starts the server backed by the given cache manager and with the corresponding configuration.protected voidstartDefaultCache()protected voidstartInternal(A configuration, EmbeddedCacheManager cacheManager)protected voidstartTransport()voidstop()Stops the serverprotected voidunregisterServerMBeans()-
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
-
Methods inherited from interface org.infinispan.server.core.ProtocolServer
getDecoder, getEncoder, getInitializer
-
-
-
-
Field Detail
-
transport
protected NettyTransport transport
-
cacheManager
protected EmbeddedCacheManager cacheManager
-
configuration
protected A extends ProtocolServerConfiguration configuration
-
-
Method Detail
-
startInternal
protected void startInternal(A configuration, EmbeddedCacheManager cacheManager)
-
start
public final void start(A configuration, EmbeddedCacheManager cacheManager)
Description copied from interface:ProtocolServerStarts the server backed by the given cache manager and with the corresponding configuration.- Specified by:
startin interfaceProtocolServer<A extends ProtocolServerConfiguration>
-
startTransport
protected void startTransport()
-
getExecutor
protected java.util.concurrent.ThreadPoolExecutor getExecutor()
-
registerServerMBeans
protected void registerServerMBeans()
-
unregisterServerMBeans
protected void unregisterServerMBeans() throws java.lang.Exception- Throws:
java.lang.Exception
-
getQualifiedName
public java.lang.String getQualifiedName()
-
stop
public void stop()
Description copied from interface:ProtocolServerStops the server- Specified by:
stopin interfaceProtocolServer<A extends ProtocolServerConfiguration>
-
getCacheManager
public EmbeddedCacheManager getCacheManager()
-
getHost
public java.lang.String getHost()
-
getPort
public java.lang.Integer getPort()
-
getConfiguration
public A getConfiguration()
Description copied from interface:ProtocolServerReturns the configuration used to start this server- Specified by:
getConfigurationin interfaceProtocolServer<A extends ProtocolServerConfiguration>
-
startDefaultCache
protected void startDefaultCache()
-
isTransportEnabled
public boolean isTransportEnabled()
-
getTransport
public NettyTransport getTransport()
-
getWorkerThreads
@Deprecated public abstract int getWorkerThreads()
Deprecated.Use thegetExecutor()to obtain information about the worker executor instead
-
-