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


Java AxisConfiguration.getClusteringAgent方法代码示例

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


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

示例1: createBasicConfigurationContext

import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
/**
 * Creates configuration context using resource file found in the classpath.
 *
 * @return Returns ConfigurationContext.
 */
public static ConfigurationContext createBasicConfigurationContext(String resourceName) throws Exception {
    InputStream in = Loader.getResourceAsStream(resourceName);

    AxisConfiguration axisConfig = new AxisConfiguration();
    AxisConfigBuilder builder = new AxisConfigBuilder(in, axisConfig, null);
    builder.populateConfig();
    axisConfig.validateSystemPredefinedPhases();
    ConfigurationContext configContext = new ConfigurationContext(axisConfig);

    if (axisConfig.getClusteringAgent() != null) {
        configContext.initCluster();
    }

    setContextPaths(axisConfig, configContext);
    return configContext;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:22,代码来源:ConfigurationContextFactory.java

示例2: AutoscalerContext

import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
private AutoscalerContext() {
    // Check clustering status
    AxisConfiguration axisConfiguration = ServiceReferenceHolder.getInstance().getAxisConfiguration();
    if ((axisConfiguration != null) && (axisConfiguration.getClusteringAgent() != null)) {
        clustered = true;
    }

    // Initialize distributed object provider
    distributedObjectProvider = ServiceReferenceHolder.getInstance().getDistributedObjectProvider();

    if (applicationContextMap == null) {
        applicationContextMap = distributedObjectProvider.getMap(AS_APPLICATION_ID_TO_APPLICATION_CTX_MAP);//new ConcurrentHashMap<String, ApplicationContext>();
    }
    setClusterMonitors(distributedObjectProvider.getMap(AS_CLUSTER_ID_TO_CLUSTER_MONITOR_MAP));
    setApplicationMonitors(distributedObjectProvider.getMap(AS_APPLICATION_ID_TO_APPLICATION_MONITOR_MAP));
    pendingApplicationMonitors = distributedObjectProvider.getList(AS_PENDING_APPLICATION_MONITOR_LIST);//new ArrayList<String>();
    applicationIdToNetworkPartitionAlgorithmContextMap =
            distributedObjectProvider.getMap(AS_APPLICATIOIN_ID_TO_NETWORK_PARTITION_ALGO_CTX_MAP);
}
 
开发者ID:apache,项目名称:stratos,代码行数:20,代码来源:AutoscalerContext.java

示例3: StratosManagerContext

import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
private StratosManagerContext() {
    // Initialize clustering status
    AxisConfiguration axisConfiguration = ServiceReferenceHolder.getInstance().getAxisConfiguration();
    if ((axisConfiguration != null) && (axisConfiguration.getClusteringAgent() != null)) {
        clustered = true;
    }

    // Initialize distributed object provider
    distributedObjectProvider = ServiceReferenceHolder.getInstance().getDistributedObjectProvider();

    // Get maps from distributed object provider
    cartridgeTypeToCartridgeGroupsMap = distributedObjectProvider.getMap(SM_CARTRIDGE_TYPE_TO_CARTIDGE_GROUPS_MAP);
    cartridgeTypeToApplicationsMap = distributedObjectProvider.getMap(SM_CARTRIDGE_TYPE_TO_APPLICATIONS_MAP);
    cartridgeGroupToCartridgeSubGroupsMap = distributedObjectProvider
            .getMap(SM_CARTRIDGE_GROUP_TO_CARTIDGE_GROUPS_MAP);
    cartridgeGroupToApplicationsMap = distributedObjectProvider.getMap(SM_CARTRIDGE_GROUP_TO_APPLICATIONS_MAP);

    // Update context from the registry
    updateContextFromRegistry();
}
 
开发者ID:apache,项目名称:stratos,代码行数:21,代码来源:StratosManagerContext.java

示例4: getStateManager

import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的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

示例5: createEmptyConfigurationContext

import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
/**
 * creates an empty configuration context.
 *
 * @return Returns ConfigurationContext.
 */
public static ConfigurationContext createEmptyConfigurationContext() throws AxisFault {
    AxisConfiguration axisConfiguration = new AxisConfiguration();
    ConfigurationContext configContext = new ConfigurationContext(axisConfiguration);
    if (axisConfiguration.getClusteringAgent() != null) {
        configContext.initCluster();
    }

    setContextPaths(axisConfiguration, configContext);
    return configContext;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:16,代码来源:ConfigurationContextFactory.java

示例6: getClusteringAgent

import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
private ClusteringAgent getClusteringAgent() throws AxisFault {
    AxisConfiguration axisConfig =
            MessageContext.getCurrentMessageContext().
                    getConfigurationContext().getAxisConfiguration();
    ClusteringAgent clusterManager = axisConfig.getClusteringAgent();
    if (clusterManager == null) {
        handleException("ClusteringAgent not enabled in axis2.xml file");
    }
    return clusterManager;
}
 
开发者ID:wso2,项目名称:carbon-commons,代码行数:11,代码来源:ClusterAdmin.java

示例7: CloudControllerContext

import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
private CloudControllerContext() {
    // Check clustering status
    AxisConfiguration axisConfiguration = ServiceReferenceHolder.getInstance().getAxisConfiguration();
    if ((axisConfiguration != null) && (axisConfiguration.getClusteringAgent() != null)) {
        clustered = true;
    }

    // Initialize distributed object provider
    distributedObjectProvider = ServiceReferenceHolder.getInstance().getDistributedObjectProvider();

    // Initialize objects
    kubernetesClustersMap = distributedObjectProvider.getMap(CC_KUB_GROUP_ID_TO_GROUP_MAP);
    clusterIdToMemberContextListMap = distributedObjectProvider.getMap(CC_CLUSTER_ID_TO_MEMBER_CTX_MAP);
    memberIdToMemberContextMap = distributedObjectProvider.getMap(CC_MEMBER_ID_TO_MEMBER_CTX_MAP);
    memberIdToScheduledTaskMap = distributedObjectProvider.getMap(CC_MEMBER_ID_TO_SCH_TASK_MAP);
    kubClusterIdToKubClusterContextMap = distributedObjectProvider.getMap(CC_KUB_CLUSTER_ID_TO_KUB_CLUSTER_CTX_MAP);
    clusterIdToContextMap = distributedObjectProvider.getMap(CC_CLUSTER_ID_TO_CLUSTER_CTX);
    cartridgeTypeToPartitionIdsMap = distributedObjectProvider.getMap(CC_CARTRIDGE_TYPE_TO_PARTITION_IDS_MAP);
    cartridgeTypeToCartridgeMap = distributedObjectProvider.getMap(CC_CARTRIDGE_TYPE_TO_CARTRIDGES_MAP);
    serviceGroupNameToServiceGroupMap = distributedObjectProvider
            .getMap(CC_SERVICE_GROUP_NAME_TO_SERVICE_GROUP_MAP);
    networkPartitionIDToNetworkPartitionMap = distributedObjectProvider
            .getMap(CC_NETWORK_PARTITION_ID_TO_NETWORK_PARTITION_MAP);
    partitionToIaasProviderByCartridge = distributedObjectProvider
            .getMap(CC_PARTITION_TO_IAAS_PROVIDER_BY_CARTRIDGE_MAP);
    cartridgeTypeToIaasProviders = distributedObjectProvider.getMap(CC_CARTRIDGE_TYPE_TO_IAAS_PROVIDER_MAP);
    applicationIdToClusterIdToPortMappings = distributedObjectProvider
            .getMap(CC_APPLICATION_ID_TO_CLUSTER_ID_TO_PORT_MAPPING_MAP);
    partitionIdToPartitionMap = distributedObjectProvider.getMap(CC_PARTITION_ID_TO_PARTITION_MAP);

    if (!unitTest) {
        // Update context from the registry
        updateContextFromRegistry();
    }
}
 
开发者ID:apache,项目名称:stratos,代码行数:36,代码来源:CloudControllerContext.java

示例8: getClusteringAgent

import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
private static ClusteringAgent getClusteringAgent() throws AxisFault {

        AxisConfiguration axisConfig =
                DataHolder.getInstance().getConfigurationContextService().getServerConfigContext().getAxisConfiguration();
        return axisConfig.getClusteringAgent();
    }
 
开发者ID:wso2,项目名称:carbon-commons,代码行数:7,代码来源:VirtualHostClusterUtil.java

示例9: isClustered

import org.apache.axis2.engine.AxisConfiguration; //导入方法依赖的package包/类
private boolean isClustered() {
    AxisConfiguration axisConfiguration = ServiceReferenceHolder.getInstance().getAxisConfiguration();
    return ((axisConfiguration != null) && (axisConfiguration.getClusteringAgent() != null)
            && (getHazelcastInstance() != null));
}
 
开发者ID:apache,项目名称:stratos,代码行数:6,代码来源:HazelcastDistributedObjectProvider.java


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