Package org.apache.stratos.throttling.agent.cache

Examples of org.apache.stratos.throttling.agent.cache.ThrottlingInfoCache


        if(tenantId <= 0){
            //We can allow all super tenant actions
            return InvocationResponse.CONTINUE;
        }
       
        ThrottlingInfoCache throttlingInfoCache = ThrottlingAgentServiceComponent.getThrottlingAgent().getThrottlingInfoCache();
        String[] actions = new String[]{StratosConstants.THROTTLING_SERVICE_IN_BANDWIDTH_ACTION,
                                        StratosConstants.THROTTLING_SERVICE_OUT_BANDWIDTH_ACTION,
                                        StratosConstants.THROTTLING_SERVICE_REQUEST_ACTION,
                                        StratosConstants.THROTTLING_SERVICE_RESPONSE_ACTION
                                        };
        ThrottlingActionInfo actionInfo = throttlingInfoCache.getTenantThrottlingInfo(tenantId).getThrottlingActionInfo(actions);

        if (actionInfo.isBlocked()) {
            String blockedMsg = actionInfo.getMessage();
            String msg = "The throttling action is blocked. message: " + blockedMsg;
            log.error(msg);
View Full Code Here


        this.stratosConfiguration = stratosConfiguration;
    }

    public ThrottlingAgent(BundleContext bundleContext) throws Exception {
        this.scheduler = Executors.newScheduledThreadPool(1, new ThrottlingAgentThreadFactory());
        this.throttlingInfoCache = new ThrottlingInfoCache();
        this.bundleContext = bundleContext;
    }
View Full Code Here

TOP

Related Classes of org.apache.stratos.throttling.agent.cache.ThrottlingInfoCache

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.