本文整理汇总了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;
}
示例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);
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
}
示例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();
}
示例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));
}