Package org.infinispan.server.core
Class AbstractProtocolServer<C extends ProtocolServerConfiguration>
java.lang.Object
org.infinispan.server.core.AbstractProtocolServer<C>
- All Implemented Interfaces:
AutoCloseable
,ProtocolServer<C>
- Direct Known Subclasses:
HotRodServer
,MemcachedServer
,RestServer
public abstract class AbstractProtocolServer<C extends ProtocolServerConfiguration>
extends Object
implements ProtocolServer<C>
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
Modifier and TypeFieldDescriptionprotected boolean
protected EmbeddedCacheManager
protected C
protected ServerManagement
protected NettyTransport
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the configuration used to start this serverReturns the enclosingProtocolServer
.getHost()
getName()
Returns the name of this servergetPort()
final String
Returns the transport for this serverprotected boolean
isCacheIgnored
(String cache) boolean
protected void
protected void
void
setEnclosingProtocolServer
(ProtocolServer<?> enclosingProtocolServer) Sets the enclosingProtocolServer
.void
setServerManagement
(ServerManagement server, boolean adminEndpoint) Sets theServerManagement
instance for this protocol servervoid
start
(C configuration, EmbeddedCacheManager cacheManager) Starts the server backed by the given cache manager, with the corresponding configuration.protected void
protected void
protected void
void
stop()
Stops the server.protected void
protected void
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.ProtocolServer
close, getChannelMatcher, getDecoder, getEncoder, getInitializer, installDetector
-
Field Details
-
transport
-
cacheManager
-
configuration
-
server
-
adminEndpoint
protected boolean adminEndpoint
-
-
Constructor Details
-
AbstractProtocolServer
-
-
Method Details
-
getName
Description copied from interface:ProtocolServer
Returns the name of this server- Specified by:
getName
in interfaceProtocolServer<C extends ProtocolServerConfiguration>
-
startInternal
protected void startInternal() -
setServerManagement
Description copied from interface:ProtocolServer
Sets theServerManagement
instance for this protocol server- Specified by:
setServerManagement
in interfaceProtocolServer<C extends ProtocolServerConfiguration>
-
isCacheIgnored
-
getServerStateManager
-
start
Description copied from interface:ProtocolServer
Starts the server backed by the given cache manager, with the corresponding configuration. The cache manager is expected to be completely initialized and started prior to this call.- Specified by:
start
in interfaceProtocolServer<C extends ProtocolServerConfiguration>
-
startTransport
protected void startTransport() -
getBlockingManager
-
getExecutor
-
registerServerMBeans
protected void registerServerMBeans() -
unregisterServerMBeans
- Throws:
Exception
-
registerMetrics
protected void registerMetrics() -
unregisterMetrics
protected void unregisterMetrics() -
getQualifiedName
-
stop
public void stop()Description copied from interface:ProtocolServer
Stops the server.- Specified by:
stop
in interfaceProtocolServer<C extends ProtocolServerConfiguration>
-
getCacheManager
-
getHost
-
getPort
-
getConfiguration
Description copied from interface:ProtocolServer
Returns the configuration used to start this server- Specified by:
getConfiguration
in interfaceProtocolServer<C extends ProtocolServerConfiguration>
-
startCaches
protected void startCaches() -
defaultCacheName
-
isTransportEnabled
public boolean isTransportEnabled() -
getTransport
Description copied from interface:ProtocolServer
Returns the transport for this server- Specified by:
getTransport
in interfaceProtocolServer<C extends ProtocolServerConfiguration>
-
setEnclosingProtocolServer
Description copied from interface:ProtocolServer
Sets the enclosingProtocolServer
. Used by the single port server- Specified by:
setEnclosingProtocolServer
in interfaceProtocolServer<C extends ProtocolServerConfiguration>
-
getEnclosingProtocolServer
Description copied from interface:ProtocolServer
Returns the enclosingProtocolServer
. May be null if this server has none.- Specified by:
getEnclosingProtocolServer
in interfaceProtocolServer<C extends ProtocolServerConfiguration>
-