本文整理了Java中org.apache.catalina.Container.getCluster()
方法的一些代码示例,展示了Container.getCluster()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Container.getCluster()
方法的具体详情如下:
包路径:org.apache.catalina.Container
类名称:Container
方法名:getCluster
[英]Return the Cluster with which this Container is associated. If there is no associated Cluster, return the Cluster associated with our parent Container (if any); otherwise return null
.
[中]返回与此容器关联的群集。如果没有关联的集群,则返回与父容器关联的集群(如果有);否则返回null
。
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Return the Cluster with which this Container is associated. If there is
* no associated Cluster, return the Cluster associated with our parent
* Container (if any); otherwise return <code>null</code>.
*/
public Cluster getCluster() {
if (cluster != null)
return (cluster);
if (parent != null)
return (parent.getCluster());
return (null);
}
代码示例来源:origin: tomcat/catalina
/**
* Return the Cluster with which this Container is associated. If there is
* no associated Cluster, return the Cluster associated with our parent
* Container (if any); otherwise return <code>null</code>.
*/
public Cluster getCluster() {
if (cluster != null)
return (cluster);
if (parent != null)
return (parent.getCluster());
return (null);
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Return the Cluster with which this Container is associated. If there is
* no associated Cluster, return the Cluster associated with our parent
* Container (if any); otherwise return <code>null</code>.
*/
public Cluster getCluster() {
if (cluster != null)
return (cluster);
if (parent != null)
return (parent.getCluster());
return (null);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Return the Cluster with which this Container is associated. If there is
* no associated Cluster, return the Cluster associated with our parent
* Container (if any); otherwise return <code>null</code>.
*/
@Override
public Cluster getCluster() {
if (cluster != null)
return (cluster);
if (parent != null)
return (parent.getCluster());
return (null);
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Return the Cluster with which this Container is associated. If there is
* no associated Cluster, return the Cluster associated with our parent
* Container (if any); otherwise return <code>null</code>.
*/
@Override
public Cluster getCluster() {
if (cluster != null)
return (cluster);
if (parent != null)
return (parent.getCluster());
return (null);
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Return the Cluster with which this Container is associated. If there is
* no associated Cluster, return the Cluster associated with our parent
* Container (if any); otherwise return <code>null</code>.
*/
@Override
public Cluster getCluster() {
if (cluster != null)
return (cluster);
if (parent != null)
return (parent.getCluster());
return (null);
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Return the Cluster with which this Container is associated. If there is
* no associated Cluster, return the Cluster associated with our parent
* Container (if any); otherwise return <code>null</code>.
*/
@Override
public Cluster getCluster() {
if (cluster != null)
return (cluster);
if (parent != null)
return (parent.getCluster());
return (null);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* Return the Cluster with which this Container is associated. If there is
* no associated Cluster, return the Cluster associated with our parent
* Container (if any); otherwise return <code>null</code>.
*/
@Override
public Cluster getCluster() {
if (cluster != null)
return (cluster);
if (parent != null)
return (parent.getCluster());
return (null);
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Return the Cluster with which this Container is associated. If there is
* no associated Cluster, return the Cluster associated with our parent
* Container (if any); otherwise return <code>null</code>.
*/
@Override
public Cluster getCluster() {
Lock readLock = clusterLock.readLock();
readLock.lock();
try {
if (cluster != null)
return cluster;
if (parent != null)
return parent.getCluster();
return null;
} finally {
readLock.unlock();
}
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Return the Cluster with which this Container is associated. If there is
* no associated Cluster, return the Cluster associated with our parent
* Container (if any); otherwise return <code>null</code>.
*/
@Override
public Cluster getCluster() {
Lock readLock = clusterLock.readLock();
readLock.lock();
try {
if (cluster != null)
return cluster;
if (parent != null)
return parent.getCluster();
return null;
} finally {
readLock.unlock();
}
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* Return the Cluster with which this Container is associated. If there is
* no associated Cluster, return the Cluster associated with our parent
* Container (if any); otherwise return <code>null</code>.
*/
@Override
public Cluster getCluster() {
Lock readLock = clusterLock.readLock();
readLock.lock();
try {
if (cluster != null)
return cluster;
if (parent != null)
return parent.getCluster();
return null;
} finally {
readLock.unlock();
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina-ha
Container host = getContainer();
if(host instanceof Host) {
if(host.getCluster() instanceof CatalinaCluster) {
setCluster((CatalinaCluster) host.getCluster());
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Start this component and implement the requirements
* of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
if (cluster == null) {
Cluster containerCluster = getContainer().getCluster();
if (containerCluster instanceof CatalinaCluster) {
setCluster((CatalinaCluster)containerCluster);
} else {
if (log.isWarnEnabled()) {
log.warn(sm.getString("ReplicationValve.nocluster"));
}
}
}
super.startInternal();
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina-ha
/**
* Start this component and implement the requirements
* of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
if (cluster == null) {
Cluster containerCluster = getContainer().getCluster();
if (containerCluster instanceof CatalinaCluster) {
setCluster((CatalinaCluster)containerCluster);
} else {
if (log.isWarnEnabled()) {
log.warn(sm.getString("ReplicationValve.nocluster"));
}
}
}
super.startInternal();
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina-ha
/**
* Start this component and implement the requirements
* of {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected synchronized void startInternal() throws LifecycleException {
if (cluster == null) {
Cluster containerCluster = getContainer().getCluster();
if (containerCluster instanceof CatalinaCluster) {
setCluster((CatalinaCluster)containerCluster);
}
}
if (log.isInfoEnabled()) {
log.info(sm.getString("jvmRoute.valve.started"));
if (cluster == null) {
log.info(sm.getString("jvmRoute.noCluster"));
}
}
super.startInternal();
}
代码示例来源:origin: codefollower/Tomcat-Research
Container host = getContainer();
if(host != null && host instanceof Host) {
cluster = host.getCluster();
if(cluster != null && cluster instanceof CatalinaCluster) {
setCluster((CatalinaCluster) cluster);
Container engine = host.getParent();
if(engine != null && engine instanceof Engine) {
cluster = engine.getCluster();
if(cluster != null && cluster instanceof CatalinaCluster) {
setCluster((CatalinaCluster) cluster);
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina-ha
Container host = getContainer();
if(host != null && host instanceof Host) {
cluster = host.getCluster();
if(cluster != null && cluster instanceof CatalinaCluster) {
setCluster((CatalinaCluster) cluster);
Container engine = host.getParent();
if(engine != null && engine instanceof Engine) {
cluster = engine.getCluster();
if(cluster != null && cluster instanceof CatalinaCluster) {
setCluster((CatalinaCluster) cluster);
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina-ha
if (manager != null && manager instanceof ClusterManager) {
ClusterManager clusterManager = (ClusterManager) manager;
CatalinaCluster containerCluster = (CatalinaCluster) getContainer().getCluster();
if (containerCluster == null) {
if (log.isWarnEnabled())
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina-ha
Container host = context.getParent() ;
if(host != null && host instanceof Host) {
cluster = host.getCluster();
if(cluster != null && cluster instanceof CatalinaCluster) {
setCluster((CatalinaCluster) cluster) ;
Container engine = host.getParent() ;
if(engine != null && engine instanceof Engine) {
cluster = engine.getCluster();
if(cluster != null && cluster instanceof CatalinaCluster) {
setCluster((CatalinaCluster) cluster) ;
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina-ha
Cluster cluster = getContainer().getCluster();
if (cluster instanceof CatalinaCluster) {
setCluster((CatalinaCluster)cluster);
内容来源于网络,如有侵权,请联系作者删除!