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