微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

org.apache.catalina.ha.session.DeltaManager的实例源码

项目:tomcat7    文件ReplicationValve.java   
/**
 * @param request
 * @param totalstart
 * @param isCrossContext
 * @param clusterManager
 * @param containerCluster
 */
protected void sendReplicationMessage(Request request,long totalstart,boolean isCrossContext,ClusterManager clusterManager,CatalinaCluster containerCluster) {
    //this happens after the request
    long start = 0;
    if(doStatistics()) {
        start = System.currentTimeMillis();
    }
    try {
        // send invalid sessions
        // DeltaManager returns String[0]
        if (!(clusterManager instanceof DeltaManager))
            sendInvalidSessions(clusterManager,containerCluster);
        // send replication
        sendSessionReplicationMessage(request,clusterManager,containerCluster);
        if(isCrossContext)
            sendCrossContextSession(containerCluster);
    } catch (Exception x) {
        // FIXME we have a lot of sends,but the trouble with one node stops the correct replication to other nodes!
        log.error(sm.getString("ReplicationValve.send.failure"),x);
    } finally {
        // FIXME this stats update are not cheap!!
        if(doStatistics()) {
            updateStats(totalstart,start);
        }
    }
}
项目:tomcat7    文件SimpleTcpCluster.java   
/**
 * Create new Manager without add to cluster (comes with start the manager)
 * 
 * @param name
 *            Context Name of this manager
 * @see org.apache.catalina.Cluster#createManager(java.lang.String)
 * @see DeltaManager#start()
 */
@Override
public synchronized Manager createManager(String name) {
    if (log.isDebugEnabled()) {
        log.debug("Creating ClusterManager for context " + name +
                " using class " + getManagerTemplate().getClass().getName());
    }
    ClusterManager manager = null;
    try {
        manager = managerTemplate.cloneFromTemplate();
        manager.setName(name);
    } catch (Exception x) {
        log.error("Unable to clone cluster manager,defaulting to org.apache.catalina.ha.session.DeltaManager",x);
        manager = new org.apache.catalina.ha.session.DeltaManager();
    } finally {
        if ( manager != null) manager.setCluster(this);
    }
    return manager;
}
项目:apache-tomcat-7.0.73-with-comment    文件ReplicationValve.java   
/**
 * @param request
 * @param totalstart
 * @param isCrossContext
 * @param clusterManager
 * @param containerCluster
 */
protected void sendReplicationMessage(Request request,start);
        }
    }
}
项目:apache-tomcat-7.0.73-with-comment    文件SimpleTcpCluster.java   
/**
 * Create new Manager without add to cluster (comes with start the manager)
 * 
 * @param name
 *            Context Name of this manager
 * @see org.apache.catalina.Cluster#createManager(java.lang.String)
 * @see DeltaManager#start()
 */
@Override
public synchronized Manager createManager(String name) {
    if (log.isDebugEnabled()) {
        log.debug("Creating ClusterManager for context " + name +
                " using class " + getManagerTemplate().getClass().getName());
    }
    ClusterManager manager = null;
    try {
        manager = managerTemplate.cloneFromTemplate();
        manager.setName(name);
    } catch (Exception x) {
        log.error("Unable to clone cluster manager,x);
        manager = new org.apache.catalina.ha.session.DeltaManager();
    } finally {
        if ( manager != null) manager.setCluster(this);
    }
    return manager;
}
项目:lazycat    文件SimpleTcpCluster.java   
/**
 * Create new Manager without add to cluster (comes with start the manager)
 * 
 * @param name
 *            Context Name of this manager
 * @see org.apache.catalina.Cluster#createManager(java.lang.String)
 * @see DeltaManager#start()
 */
@Override
public synchronized Manager createManager(String name) {
    if (log.isDebugEnabled()) {
        log.debug("Creating ClusterManager for context " + name + " using class "
                + getManagerTemplate().getClass().getName());
    }
    ClusterManager manager = null;
    try {
        manager = managerTemplate.cloneFromTemplate();
        manager.setName(name);
    } catch (Exception x) {
        log.error("Unable to clone cluster manager,x);
        manager = new org.apache.catalina.ha.session.DeltaManager();
    } finally {
        if (manager != null)
            manager.setCluster(this);
    }
    return manager;
}
项目:class-guard    文件ReplicationValve.java   
/**
 * @param request
 * @param totalstart
 * @param isCrossContext
 * @param clusterManager
 * @param containerCluster
 */
protected void sendReplicationMessage(Request request,start);
        }
    }
}
项目:class-guard    文件SimpleTcpCluster.java   
/**
 * Create new Manager without add to cluster (comes with start the manager)
 * 
 * @param name
 *            Context Name of this manager
 * @see org.apache.catalina.Cluster#createManager(java.lang.String)
 * @see DeltaManager#start()
 */
@Override
public synchronized Manager createManager(String name) {
    if (log.isDebugEnabled()) {
        log.debug("Creating ClusterManager for context " + name +
                " using class " + getManagerTemplate().getClass().getName());
    }
    ClusterManager manager = null;
    try {
        manager = managerTemplate.cloneFromTemplate();
        manager.setName(name);
    } catch (Exception x) {
        log.error("Unable to clone cluster manager,x);
        manager = new org.apache.catalina.ha.session.DeltaManager();
    } finally {
        if ( manager != null) manager.setCluster(this);
    }
    return manager;
}
项目:apache-tomcat-7.0.57    文件ReplicationValve.java   
/**
 * @param request
 * @param totalstart
 * @param isCrossContext
 * @param clusterManager
 * @param containerCluster
 */
protected void sendReplicationMessage(Request request,start);
        }
    }
}
项目:apache-tomcat-7.0.57    文件SimpleTcpCluster.java   
/**
 * Create new Manager without add to cluster (comes with start the manager)
 * 
 * @param name
 *            Context Name of this manager
 * @see org.apache.catalina.Cluster#createManager(java.lang.String)
 * @see DeltaManager#start()
 */
@Override
public synchronized Manager createManager(String name) {
    if (log.isDebugEnabled()) {
        log.debug("Creating ClusterManager for context " + name +
                " using class " + getManagerTemplate().getClass().getName());
    }
    ClusterManager manager = null;
    try {
        manager = managerTemplate.cloneFromTemplate();
        manager.setName(name);
    } catch (Exception x) {
        log.error("Unable to clone cluster manager,x);
        manager = new org.apache.catalina.ha.session.DeltaManager();
    } finally {
        if ( manager != null) manager.setCluster(this);
    }
    return manager;
}
项目:WBSAirback    文件ReplicationValve.java   
/**
 * @param request
 * @param totalstart
 * @param isCrossContext
 * @param clusterManager
 * @param containerCluster
 */
protected void sendReplicationMessage(Request request,start);
        }
    }
}
项目:WBSAirback    文件SimpleTcpCluster.java   
/**
 * Create new Manager without add to cluster (comes with start the manager)
 * 
 * @param name
 *            Context Name of this manager
 * @see org.apache.catalina.Cluster#createManager(java.lang.String)
 * @see DeltaManager#start()
 */
@Override
public synchronized Manager createManager(String name) {
    if (log.isDebugEnabled()) {
        log.debug("Creating ClusterManager for context " + name +
                " using class " + getManagerTemplate().getClass().getName());
    }
    Manager manager = null;
    try {
        manager = managerTemplate.cloneFromTemplate();
        ((ClusterManager)manager).setName(name);
    } catch (Exception x) {
        log.error("Unable to clone cluster manager,x);
        manager = new org.apache.catalina.ha.session.DeltaManager();
    } finally {
        if ( manager != null && (manager instanceof ClusterManager)) ((ClusterManager)manager).setCluster(this);
    }
    return manager;
}
项目:lazycat    文件ReplicationValve.java   
/**
 * @param request
 * @param totalstart
 * @param isCrossContext
 * @param clusterManager
 * @param containerCluster
 */
protected void sendReplicationMessage(Request request,CatalinaCluster containerCluster) {
    // this happens after the request
    long start = 0;
    if (doStatistics()) {
        start = System.currentTimeMillis();
    }
    try {
        // send invalid sessions
        // DeltaManager returns String[0]
        if (!(clusterManager instanceof DeltaManager))
            sendInvalidSessions(clusterManager,containerCluster);
        if (isCrossContext)
            sendCrossContextSession(containerCluster);
    } catch (Exception x) {
        // FIXME we have a lot of sends,but the trouble with one node stops
        // the correct replication to other nodes!
        log.error(sm.getString("ReplicationValve.send.failure"),x);
    } finally {
        // FIXME this stats update are not cheap!!
        if (doStatistics()) {
            updateStats(totalstart,start);
        }
    }
}
项目:WBSAirback    文件ClusterJmxHelper.java   
protected static void initDefaultCluster() {
    initMetaData(SimpleTcpCluster.class);
    initMetaData(DeltaManager.class);
    initMetaData(FarmWarDeployer.class); //not functional yet
    initMetaData(ClusterSingleSignOn.class); //not functional yet
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。