Package org.apache.stratos.mediator.autoscale.lbautoscale.context

Examples of org.apache.stratos.mediator.autoscale.lbautoscale.context.AppDomainContext


       
        String tokenId = (String) synCtx.getProperty(AutoscaleConstants.REQUEST_ID);
        @SuppressWarnings("unchecked")
        Map<String, Map<String, AppDomainContext>> appDomainContexts =
            (Map<String, Map<String, AppDomainContext>>) configCtx.getPropertyNonReplicable(AutoscaleConstants.APP_DOMAIN_CONTEXTS);
        AppDomainContext appDomainContext = null ;
       
        if(appDomainContexts.get(domain) != null){
          appDomainContext = appDomainContexts.get(domain).get(subDomain);
        }
       
        if (appDomainContext != null) {
            appDomainContext.removeRequestToken(tokenId);
            System.setProperty(AutoscaleConstants.IS_TOUCHED, "true");
        } else {
            log.debug("AppDomainContext not found for domain " + domain+" and sub domain : "+subDomain);
        }
        return true;
View Full Code Here


                    }

                    if(oldAppDomainContexts == null || oldAppDomainContexts.get(domain) == null ||
                        (oldAppDomainContexts.get(domain) != null && oldAppDomainContexts.get(domain).get(subDomain) == null)){
                     
                      AppDomainContext appCtxt = new AppDomainContext(lbConfig.getServiceConfig(domain,
                                subDomain));

                      addAppDomainContext(newAppDomainContexts, domain, subDomain, appCtxt);
                     
                    } else {
View Full Code Here

        if (appDomainContexts.get(domain) == null) {
            // if we do not find a correct context, we just ignore
            log.debug("AppDomainContext not found for domain " + domain);

        } else {
            AppDomainContext appDomainContext = (AppDomainContext) appDomainContexts.get(domain).get(subDomain);

            if (appDomainContext != null) {
                appDomainContext.addRequestToken(uuid);
                System.setProperty(AutoscaleConstants.IS_TOUCHED, "true");

            } else {
                // if we do not find a correct context, we just ignore
                log.debug("AppDomainContext not found for sub domain: " + subDomain +
View Full Code Here

            // get the list of service sub_domains specified in loadbalancer config
            String[] serviceSubDomains = loadBalancerConfig.getServiceSubDomains(serviceDomain);

            for (String serviceSubDomain : serviceSubDomains) {
                log.debug("Sanity check has started for: "+AutoscaleUtil.domainSubDomainString(serviceDomain, serviceSubDomain));
                AppDomainContext appCtxt;
                if (appDomainContexts.get(serviceDomain) != null) {
                    appCtxt = (AppDomainContext) appDomainContexts.get(serviceDomain).get(serviceSubDomain);
                   
                    if (appCtxt != null) {
                        // Concurrently perform the application node sanity check.
View Full Code Here

            for (String serviceSubDomain : serviceSubDomains) {

                log.debug("Autoscaling analysis is starting to run for domain: " + serviceDomain +
                    " and sub domain: " + serviceSubDomain);

                AppDomainContext appCtxt;
                if (appDomainContexts.get(serviceDomain) != null) {
                    appCtxt = (AppDomainContext) appDomainContexts.get(serviceDomain).get(serviceSubDomain);

                    if (appCtxt != null) {
View Full Code Here

            // get the list of service sub_domains specified in loadbalancer config
            String[] serviceSubDomains = loadBalancerConfig.getServiceSubDomains(serviceDomain);

            for (String serviceSubDomain : serviceSubDomains) {

                AppDomainContext appCtxt;
                if (appDomainContexts.get(serviceDomain) != null) {
                    appCtxt = (AppDomainContext) appDomainContexts.get(serviceDomain).get(serviceSubDomain);
                   
                    log.debug("Values in App domain context: " +
                        appCtxt.getPendingInstanceCount() +
                            " - " +
                            appCtxt.getRunningInstanceCount() +
                            " - Ctxt: " +
                            appCtxt.hashCode());

                    if (appCtxt != null) {
                        Callable<Boolean> worker =
                            new InstanceCountCallable(serviceDomain, serviceSubDomain, autoscalerService, appCtxt);
                        Future<Boolean> countInstancesJob = executor.submit(worker);
View Full Code Here

TOP

Related Classes of org.apache.stratos.mediator.autoscale.lbautoscale.context.AppDomainContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.