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 EmbeddedCacheManager
cacheManager
protected A
configuration
protected NettyTransport
transport
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractProtocolServer(String protocolName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description EmbeddedCacheManager
getCacheManager()
A
getConfiguration()
Returns the configuration used to start this serverprotected ThreadPoolExecutor
getExecutor()
String
getHost()
Integer
getPort()
String
getQualifiedName()
NettyTransport
getTransport()
ComponentStatus
getTransportStatus()
abstract int
getWorkerThreads()
Deprecated.Use thegetExecutor()
to obtain information about the worker executor insteadboolean
isTransportEnabled()
protected void
registerServerMBeans()
void
start(A configuration, EmbeddedCacheManager cacheManager)
Starts the server backed by the given cache manager and with the corresponding configuration.protected void
startDefaultCache()
protected void
startInternal(A configuration, EmbeddedCacheManager cacheManager)
void
startTransport()
void
stop()
Stops the servervoid
stopTransport()
protected void
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
-
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
-
-
Constructor Detail
-
AbstractProtocolServer
protected AbstractProtocolServer(String protocolName)
-
-
Method Detail
-
startInternal
protected void startInternal(A configuration, EmbeddedCacheManager cacheManager)
-
start
public final void start(A configuration, EmbeddedCacheManager cacheManager)
Description copied from interface:ProtocolServer
Starts the server backed by the given cache manager and with the corresponding configuration.- Specified by:
start
in interfaceProtocolServer<A extends ProtocolServerConfiguration>
-
startTransport
public void startTransport()
-
stopTransport
public void stopTransport()
-
getTransportStatus
public ComponentStatus getTransportStatus()
-
getExecutor
protected ThreadPoolExecutor getExecutor()
-
registerServerMBeans
protected void registerServerMBeans()
-
getQualifiedName
public String getQualifiedName()
-
stop
public void stop()
Description copied from interface:ProtocolServer
Stops the server- Specified by:
stop
in interfaceProtocolServer<A extends ProtocolServerConfiguration>
-
getCacheManager
public EmbeddedCacheManager getCacheManager()
-
getHost
public String getHost()
-
getPort
public Integer getPort()
-
getConfiguration
public A getConfiguration()
Description copied from interface:ProtocolServer
Returns the configuration used to start this server- Specified by:
getConfiguration
in 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
-
-