当前位置: 首页>>代码示例>>Java>>正文


Java ClusteringAgent.getStateManager方法代码示例

本文整理汇总了Java中org.apache.axis2.clustering.ClusteringAgent.getStateManager方法的典型用法代码示例。如果您正苦于以下问题:Java ClusteringAgent.getStateManager方法的具体用法?Java ClusteringAgent.getStateManager怎么用?Java ClusteringAgent.getStateManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.axis2.clustering.ClusteringAgent的用法示例。


在下文中一共展示了ClusteringAgent.getStateManager方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initCluster

import org.apache.axis2.clustering.ClusteringAgent; //导入方法依赖的package包/类
/**
 * Initializes the ClusterManager for this ConfigurationContext
 *
 * @throws AxisFault
 */
public void initCluster() throws AxisFault {
    ClusteringAgent clusteringAgent = axisConfiguration.getClusteringAgent();
    if (clusteringAgent != null) {
        StateManager stateManaget = clusteringAgent.getStateManager();
        if (stateManaget != null) {
            stateManaget.setConfigurationContext(this);
        }
        NodeManager nodeManager = clusteringAgent.getNodeManager();
        if (nodeManager != null) {
            nodeManager.setConfigurationContext(this);
        }
        if (shouldClusterBeInitiated(clusteringAgent)) {
            clusteringAgent.setConfigurationContext(this);
            clusteringAgent.init();
        }
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:23,代码来源:ConfigurationContext.java

示例2: needPropertyDifferences

import org.apache.axis2.clustering.ClusteringAgent; //导入方法依赖的package包/类
/**
 * @return true if we need to store property differences for this 
 * context in this scenario.
 */
private boolean needPropertyDifferences() {
    
    // Don't store property differences if there are no 
    // cluster members.
    
    ConfigurationContext cc = getRootContext();
    if (cc == null) {
        return false;
    }
    // Add the property differences only if Context replication is enabled,
    // and there are members in the cluster
    ClusteringAgent clusteringAgent = cc.getAxisConfiguration().getClusteringAgent();
    if (clusteringAgent == null ||
        clusteringAgent.getStateManager() == null) {
        return false;
    }
    return true;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:23,代码来源:AbstractContext.java

示例3: getStateManager

import org.apache.axis2.clustering.ClusteringAgent; //导入方法依赖的package包/类
private static StateManager getStateManager(AxisConfiguration axisConfiguration) {
    ClusteringAgent clusteringAgent = axisConfiguration.getClusteringAgent();
    if (clusteringAgent != null) {
        return clusteringAgent.getStateManager();
    }
    return null;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:8,代码来源:Replicator.java

示例4: execute

import org.apache.axis2.clustering.ClusteringAgent; //导入方法依赖的package包/类
public void execute(ConfigurationContext configCtx) throws ClusteringFault {
    ClusteringAgent clusteringAgent = configCtx.getAxisConfiguration().getClusteringAgent();
    if(clusteringAgent == null){
        return;
    }
    StateManager stateManager = clusteringAgent.getStateManager();
    if (stateManager != null) {
        Map excludedPropPatterns = stateManager.getReplicationExcludePatterns();
        List<StateClusteringCommand> cmdList = new ArrayList<StateClusteringCommand>();

        // Add the service group contexts, service contexts & their respective properties
        String[] sgCtxIDs = configCtx.getServiceGroupContextIDs();
        for (String sgCtxID : sgCtxIDs) {
            ServiceGroupContext sgCtx = configCtx.getServiceGroupContext(sgCtxID);
            StateClusteringCommand updateServiceGroupCtxCmd =
                    StateClusteringCommandFactory.getUpdateCommand(sgCtx,
                                                                     excludedPropPatterns,
                                                                     true);
            if (updateServiceGroupCtxCmd != null) {
                cmdList.add(updateServiceGroupCtxCmd);
            }
            if (sgCtx.getServiceContexts() != null) {
                for (Iterator iter2 = sgCtx.getServiceContexts(); iter2.hasNext();) {
                    ServiceContext serviceCtx = (ServiceContext) iter2.next();
                    StateClusteringCommand updateServiceCtxCmd =
                            StateClusteringCommandFactory.getUpdateCommand(serviceCtx,
                                                                             excludedPropPatterns,
                                                                             true);
                    if (updateServiceCtxCmd != null) {
                        cmdList.add(updateServiceCtxCmd);
                    }
                }
            }
        }

        StateClusteringCommand updateCmd =
                StateClusteringCommandFactory.getUpdateCommand(configCtx,
                                                                 excludedPropPatterns,
                                                                 true);
        if (updateCmd != null) {
            cmdList.add(updateCmd);
        }
        if (!cmdList.isEmpty()) {
            commands = cmdList.toArray(new StateClusteringCommand[cmdList.size()]);
        }
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:48,代码来源:GetStateCommand.java

示例5: canReplicate

import org.apache.axis2.clustering.ClusteringAgent; //导入方法依赖的package包/类
/**
 * Check whether the state store in the specified <code>messageContext</code> can be replicated.
 * Also note that if there are no members, we need not do any replication
 *
 * @param messageContext The MessageContext to be subjected to this test
 * @return true - State needs to be replicated
 *         false - otherwise
 */
private static boolean canReplicate(MessageContext messageContext) {
    ClusteringAgent clusteringAgent =
            messageContext.getRootContext().getAxisConfiguration().getClusteringAgent();
    return clusteringAgent != null && clusteringAgent.getStateManager() != null;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:14,代码来源:Replicator.java


注:本文中的org.apache.axis2.clustering.ClusteringAgent.getStateManager方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。