/** * The position of the current EPR * * @param currentEPR The current position */ public void setCurrentEndpointIndex(int currentEPR) { this.currentEPR = currentEPR; cfgCtx.setNonReplicableProperty(CURRENT_EPR_PROP_KEY, currentEPR); }
/** * The position of the current EPR * * @param currentEPR The current position */ public void setCurrentEndpointIndex(int currentEPR) { this.currentEPR = currentEPR; cfgCtx.setNonReplicableProperty(CURRENT_EPR_PROP_KEY, currentEPR); }
public void execute(ConfigurationContext configurationContext) throws ClusteringFault { // set the appDomainContexts map configurationContext.setNonReplicableProperty("autoscale.app.domain.contexts", getAppDomainContexts()); log.info("Request Tokens Replicated! "); }
public void execute(ConfigurationContext configContext) throws ClusteringFault { log.info("Received state initialization message"); // Run this code only if this node is not already initialized if (configContext. getPropertyNonReplicable(ClusteringConstants.RECD_STATE_INIT_MSG) == null) { configContext. setNonReplicableProperty(ClusteringConstants.RECD_STATE_INIT_MSG, "true"); // log.info("Received state initialization message"); if (commands != null) { for (int i = 0; i < commands.length; i++) { commands[i].execute(configContext); } } } }
/** * Helper method to replicates states of the property with given key * replicates the given state so that all instances across cluster can see this state * * @param key The key of the property * @param value The value of the property * @param configCtx Axis2 COnfiguration Context */ public static void setAndReplicateState(String key, Object value, ConfigurationContext configCtx) { if (configCtx != null && key != null && value != null) { try { if (log.isDebugEnabled()) { log.debug("Start replicating the property with key : " + key + " value : " + value); } configCtx.setNonReplicableProperty(key, value); org.apache.axis2.clustering.state.Replicator.replicate( configCtx, new String[]{key}); if (log.isDebugEnabled()) { log.debug("Completed replication of the property with key : " + key); } } catch (ClusteringFault clusteringFault) { handleException("Error during the replicating states ", clusteringFault); } } }
public void execute(ConfigurationContext configContext) throws ClusteringFault { log.info("Received state initialization message"); // Run this code only if this node is not already initialized if (configContext. getPropertyNonReplicable(ClusteringConstants.RECD_STATE_INIT_MSG) == null) { configContext. setNonReplicableProperty(ClusteringConstants.RECD_STATE_INIT_MSG, "true"); // log.info("Received state initialization message"); if (commands != null) { for (int i = 0; i < commands.length; i++) { commands[i].execute(configContext); } } } }
private void initDataHolder() { if (configctx != null) { if (dataHolder == null) { dataHolder = (ThrottleDataHolder) configctx.getPropertyNonReplicable(ThrottleConstants.THROTTLE_INFO_KEY); synchronized (configctx) { if (dataHolder == null) { dataHolder = new ThrottleDataHolder(); configctx.setNonReplicableProperty(ThrottleConstants.THROTTLE_INFO_KEY, dataHolder); } } } } }
/** * Helper method to replicates states of the property with given key * replicates the given state so that all instances across cluster can see this state * * @param key The key of the property * @param value The value of the property * @param configCtx Axis2 COnfiguration Context */ public static void setAndReplicateState(String key, Object value, ConfigurationContext configCtx) { if (configCtx != null && key != null && value != null) { try { if (log.isDebugEnabled()) { log.debug("Start replicating the property with key : " + key + " value : " + value); } configCtx.setNonReplicableProperty(key, value); org.apache.axis2.clustering.state.Replicator.replicate( configCtx, new String[]{key}); if (log.isDebugEnabled()) { log.debug("Completed replication of the property with key : " + key); } } catch (ClusteringFault clusteringFault) { handleException("Error during the replicating states ", clusteringFault); } } }
configCtx.setNonReplicableProperty(AutoscaleConstants.APP_DOMAIN_CONTEXTS, newAppDomainContexts);
log.info("Received configuration initialization message"); configContext. setNonReplicableProperty(ClusteringConstants.RECD_CONFIG_INIT_MSG, "true"); if (serviceGroups != null) {
!endpointDefinition.isReplicationDisabled())) { cfgCtx.setNonReplicableProperty(STATE_KEY, ST_ACTIVE);
!endpointDefinition.isReplicationDisabled())) { cfgCtx.setNonReplicableProperty(STATE_KEY, ST_ACTIVE);
log.info("Received configuration initialization message"); configContext. setNonReplicableProperty(ClusteringConstants.RECD_CONFIG_INIT_MSG, "true"); if (serviceGroups != null) {
if (param != null) { String[] warnOnHttp500 = ((String) param.getValue()).split("\\|"); cfgCtx.setNonReplicableProperty("warnOnHTTP500", warnOnHttp500);
.getInstance() .getConfigCtxt() .setNonReplicableProperty( CreateClusterDomainMessage.CLUSTER_DOMAIN_MANAGER, new ClusterDomainManagerImpl());
setNonReplicableProperty(ClusteringConstants.CLUSTER_INITIALIZED, "true"); log.info("Cluster initialization completed.");
if (throttles == null) { throttles = new HashMap(); configctx.setNonReplicableProperty(ThrottleConstants.THROTTLES_MAP, throttles);
setNonReplicableProperty(ClusteringConstants.CLUSTER_INITIALIZED, "true"); log.info("Cluster initialization completed.");
if (dataHolder == null) { dataHolder = new ThrottleDataHolder(); configContext.setNonReplicableProperty (ThrottleConstants.THROTTLE_INFO_KEY, dataHolder);
if (dataHolder == null) { dataHolder = new ThrottleDataHolder(); cc.setNonReplicableProperty(ThrottleConstants.THROTTLE_INFO_KEY, dataHolder);