public class ModClusterListener extends ModClusterConfig implements org.apache.catalina.LifecycleListener, LoadBalanceFactorProviderFactory, ModClusterServiceMBean
DEFAULT_SOCKET_ADDRESS
Modifier | Constructor and Description |
---|---|
|
ModClusterListener()
Constructs a new ModClusterListener
|
protected |
ModClusterListener(ModClusterServiceMBean mbean,
org.apache.catalina.LifecycleListener listener) |
Modifier and Type | Method and Description |
---|---|
void |
addProxy(String host,
int port) |
LoadBalanceFactorProvider |
createLoadBalanceFactorProvider() |
boolean |
disable() |
boolean |
disableContext(String hostName,
String contextPath) |
boolean |
enable() |
boolean |
enableContext(String hostName,
String contextPath) |
Class<? extends JvmRouteFactory> |
getJvmRouteFactoryClass() |
int |
getLoadDecayFactor()
Returns the factor by which the contribution of historical load values to the load factor calculation should
exponentially decay.
|
int |
getLoadHistory()
Returns the number of historic load values used when calculating the load factor.
|
double |
getLoadMetricCapacity() |
String |
getLoadMetricClass()
Returns the class name of the configured load metric.
|
Map<InetSocketAddress,String> |
getProxyConfiguration() |
String |
getProxyConfigurationString() |
Map<InetSocketAddress,String> |
getProxyInfo() |
String |
getProxyInfoString() |
void |
lifecycleEvent(org.apache.catalina.LifecycleEvent event) |
Map<InetSocketAddress,String> |
ping() |
Map<InetSocketAddress,String> |
ping(String jvmRoute) |
Map<InetSocketAddress,String> |
ping(String scheme,
String host,
int port) |
void |
refresh() |
void |
removeProxy(String host,
int port) |
void |
reset() |
void |
setJvmRouteFactoryClass(Class<? extends JvmRouteFactory> factoryClass) |
void |
setLoadDecayFactor(int decayFactor)
Sets the factor by which the contribution of historical load values to the load factor calculation should exponentially
decay.
|
void |
setLoadHistory(int history)
Sets the number of historic load values used when calculating the load factor.
|
void |
setLoadMetricCapacity(String capacity)
Sets the capacity (i.e.
|
void |
setLoadMetricClass(String loadMetricClass)
Sets the class of the desired load metric
|
boolean |
stop(long timeout) |
boolean |
stop(long timeout,
TimeUnit unit) |
boolean |
stopContext(String host,
String path,
long timeout) |
boolean |
stopContext(String host,
String path,
long timeout,
TimeUnit unit) |
getAdvertise, getAdvertiseGroupAddress, getAdvertiseInterface, getAdvertisePort, getAdvertiseSecurityKey, getAdvertiseSocketAddress, getAdvertiseThreadFactory, getBalancer, getExcludedContexts, getExcludedContextsPerHost, getFlushPackets, getFlushWait, getJvmRouteFactory, getLoadBalancingGroup, getMaxAttempts, getNodeTimeout, getPing, getProxies, getProxyConfigurations, getProxyList, getProxyURL, getSessionDrainingStrategy, getSmax, getSocketTimeout, getSslCertificateEncodingAlgorithm, getSslCiphers, getSslCrlFile, getSslKeyAlias, getSslKeyStore, getSslKeyStorePassword, getSslKeyStoreProvider, getSslKeyStoreType, getSslProtocol, getSslTrustAlgorithm, getSslTrustMaxCertLength, getSslTrustStore, getSslTrustStorePassword, getSslTrustStoreProvider, getSslTrustStoreType, getStickySession, getStickySessionForce, getStickySessionRemove, getStopContextTimeout, getStopContextTimeoutUnit, getTtl, getWorkerTimeout, isAutoEnableContexts, isSsl, setAdvertise, setAdvertiseGroupAddress, setAdvertiseGroupAddress, setAdvertiseInterface, setAdvertiseInterface, setAdvertisePort, setAdvertiseSecurityKey, setAdvertiseSocketAddress, setAdvertiseThreadFactory, setAutoEnableContexts, setBalancer, setExcludedContexts, setExcludedContextsPerHost, setFlushPackets, setFlushWait, setJvmRouteFactory, setLoadBalancingGroup, setMaxAttempts, setNodeTimeout, setPing, setProxies, setProxyConfigurations, setProxyList, setProxyURL, setSessionDrainingStrategy, setSessionDrainingStrategy, setSmax, setSocketTimeout, setSsl, setSslCertificateEncodingAlgorithm, setSslCiphers, setSslCrlFile, setSslKeyAlias, setSslKeyStore, setSslKeyStorePassword, setSslKeyStoreProvider, setSslKeyStoreType, setSslProtocol, setSslTrustAlgorithm, setSslTrustMaxCertLength, setSslTrustStore, setSslTrustStorePassword, setSslTrustStoreProvider, setSslTrustStoreType, setStickySession, setStickySessionForce, setStickySessionRemove, setStopContextTimeout, setStopContextTimeoutUnit, setTtl, setWorkerTimeout
public ModClusterListener()
protected ModClusterListener(ModClusterServiceMBean mbean, org.apache.catalina.LifecycleListener listener)
public LoadBalanceFactorProvider createLoadBalanceFactorProvider()
createLoadBalanceFactorProvider
in interface LoadBalanceFactorProviderFactory
LoadBalanceFactorProviderFactory.createLoadBalanceFactorProvider()
public void lifecycleEvent(org.apache.catalina.LifecycleEvent event)
lifecycleEvent
in interface org.apache.catalina.LifecycleListener
LifecycleListener.lifecycleEvent(org.apache.catalina.LifecycleEvent)
public Class<? extends JvmRouteFactory> getJvmRouteFactoryClass()
public void setJvmRouteFactoryClass(Class<? extends JvmRouteFactory> factoryClass)
public String getLoadMetricClass()
LoadMetric
public void setLoadMetricClass(String loadMetricClass)
loadMetricClass
- a class implementing LoadMetric
ClassNotFoundException
public int getLoadDecayFactor()
public void setLoadDecayFactor(int decayFactor)
decayFactor
- a positive numberpublic int getLoadHistory()
public void setLoadHistory(int history)
history
- public double getLoadMetricCapacity()
org.jboss.modcluster.config.LoadMetricConfiguration#getLoadMetricCapacity()
public void setLoadMetricCapacity(String capacity)
getLoadMetricClass()
capacity
- a load capacitypublic void addProxy(String host, int port)
addProxy
in interface ModClusterServiceMBean
host
- the hostname of the proxy; a string suitable for passing to InetAddress.getByHost(...)
port
- the port on which the proxy listens for MCMP requestsModClusterServiceMBean.addProxy(java.lang.String, int)
public boolean disable()
disable
in interface ModClusterServiceMBean
ModClusterServiceMBean.disable()
public boolean disableContext(String hostName, String contextPath)
disableContext
in interface ModClusterServiceMBean
hostName
- host name of the target webappcontextPath
- context path of the target webappModClusterServiceMBean.disableContext(java.lang.String, java.lang.String)
public Map<InetSocketAddress,String> ping()
ping
in interface ModClusterServiceMBean
ModClusterServiceMBean.ping()
public Map<InetSocketAddress,String> ping(String jvmRoute)
ping
in interface ModClusterServiceMBean
jvmRoute
- a jvm route.ModClusterServiceMBean.ping(java.lang.String)
public Map<InetSocketAddress,String> ping(String scheme, String host, int port)
ping
in interface ModClusterServiceMBean
scheme
- (ajp, http or https)host
- (name or ip of a the host)ModClusterServiceMBean.ping(java.lang.String, java.lang.String, int)
public boolean enable()
enable
in interface ModClusterServiceMBean
ModClusterServiceMBean.enable()
public boolean enableContext(String hostName, String contextPath)
enableContext
in interface ModClusterServiceMBean
hostName
- host name of the target webappcontextPath
- context path of the target webappModClusterServiceMBean.enableContext(java.lang.String, java.lang.String)
public Map<InetSocketAddress,String> getProxyConfiguration()
getProxyConfiguration
in interface ModClusterServiceMBean
ModClusterServiceMBean.getProxyConfiguration()
public String getProxyConfigurationString()
public Map<InetSocketAddress,String> getProxyInfo()
getProxyInfo
in interface ModClusterServiceMBean
ModClusterServiceMBean.getProxyInfo()
public String getProxyInfoString()
public void refresh()
refresh
in interface ModClusterServiceMBean
ModClusterServiceMBean.refresh()
public void removeProxy(String host, int port)
removeProxy
in interface ModClusterServiceMBean
host
- the hostname of the proxy; a string suitable for passing to InetAddress.getByHost(...)
port
- the port on which the proxy listens for MCMP requestsModClusterServiceMBean.removeProxy(java.lang.String, int)
public void reset()
reset
in interface ModClusterServiceMBean
ModClusterServiceMBean.reset()
public boolean stop(long timeout, TimeUnit unit)
stop
in interface ModClusterServiceMBean
timeout
- number of units of time for which to wait for sessions to drain. Negative or zero timeout value will wait
forever.unit
- unit of time represented in timeout parameterModClusterServiceMBean.stop(long, java.util.concurrent.TimeUnit)
public boolean stop(long timeout)
public boolean stopContext(String host, String path, long timeout, TimeUnit unit)
stopContext
in interface ModClusterServiceMBean
timeout
- number of units of time for which to wait for sessions to drain. Negative or zero timeout value will wait
forever.unit
- unit of time represented in timeout parameterModClusterServiceMBean.stopContext(java.lang.String, java.lang.String, long,
java.util.concurrent.TimeUnit)
Copyright © 2017 JBoss by Red Hat. All rights reserved.