Package org.infinispan.server.core
Class AbstractProtocolServer<C extends ProtocolServerConfiguration>
java.lang.Object
org.infinispan.server.core.AbstractProtocolServer<C>
- All Implemented Interfaces:
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
FieldsModifier and TypeFieldDescriptionprotected booleanprotected EmbeddedCacheManagerprotected Cprotected ServerManagementprotected NettyTransport -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the configuration used to start this serverReturns the enclosingProtocolServer.getHost()getName()Returns the name of this servergetPort()final StringReturns the transport for this serverprotected booleanisCacheIgnored(String cache) booleanprotected voidprotected voidvoidsetEnclosingProtocolServer(ProtocolServer<?> enclosingProtocolServer) Sets the enclosingProtocolServer.voidsetServerManagement(ServerManagement server, boolean adminEndpoint) Sets theServerManagementinstance for this protocol servervoidstart(C configuration, EmbeddedCacheManager cacheManager) Starts the server backed by the given cache manager, with the corresponding configuration.protected voidprotected voidprotected voidvoidstop()Stops the server.protected voidprotected voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.server.core.ProtocolServer
getChannelMatcher, getDecoder, getEncoder, getInitializer
-
Field Details
-
transport
-
cacheManager
-
configuration
-
server
-
adminEndpoint
protected boolean adminEndpoint
-
-
Constructor Details
-
AbstractProtocolServer
-
-
Method Details
-
getName
Description copied from interface:ProtocolServerReturns the name of this server- Specified by:
getNamein interfaceProtocolServer<C extends ProtocolServerConfiguration>
-
startInternal
protected void startInternal() -
setServerManagement
Description copied from interface:ProtocolServerSets theServerManagementinstance for this protocol server- Specified by:
setServerManagementin interfaceProtocolServer<C extends ProtocolServerConfiguration>
-
isCacheIgnored
-
getServerStateManager
-
start
Description copied from interface:ProtocolServerStarts 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:
startin 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:ProtocolServerStops the server.- Specified by:
stopin interfaceProtocolServer<C extends ProtocolServerConfiguration>
-
getCacheManager
-
getHost
-
getPort
-
getConfiguration
Description copied from interface:ProtocolServerReturns the configuration used to start this server- Specified by:
getConfigurationin interfaceProtocolServer<C extends ProtocolServerConfiguration>
-
startCaches
protected void startCaches() -
defaultCacheName
-
isTransportEnabled
public boolean isTransportEnabled() -
getTransport
Description copied from interface:ProtocolServerReturns the transport for this server- Specified by:
getTransportin interfaceProtocolServer<C extends ProtocolServerConfiguration>
-
setEnclosingProtocolServer
Description copied from interface:ProtocolServerSets the enclosingProtocolServer. Used by the single port server- Specified by:
setEnclosingProtocolServerin interfaceProtocolServer<C extends ProtocolServerConfiguration>
-
getEnclosingProtocolServer
Description copied from interface:ProtocolServerReturns the enclosingProtocolServer. May be null if this server has none.- Specified by:
getEnclosingProtocolServerin interfaceProtocolServer<C extends ProtocolServerConfiguration>
-