Examples of SystemStatistics


Examples of org.wso2.carbon.statistics.services.util.SystemStatistics

        }

    }

    private OMElement constructEventPayLoad(StatisticData statData) {
        SystemStatistics systemStatistics = statData.getSystemStatistics();
        Collection<OperationStatisticData> operationStatisticsList = statData.getOperationStatisticsList();
        Collection<ServiceStatisticData> serviceStatisticsList = statData.getServiceStatisticsList();

        List<EventData> opData = new ArrayList<EventData>();
        List<EventData> serviceData = new ArrayList<EventData>();
View Full Code Here

Examples of org.wso2.carbon.statistics.services.util.SystemStatistics

            EventingConfigData eventingConfigData = StatisticsServiceComponent.getServiceStatisticsPublisherAdmin()
                    .getEventingConfigData();

            if (eventingConfigData != null && eventingConfigData.eventingEnabled()
                    && eventingConfigData.getSystemRequestCountThreshold() > 0) {
                SystemStatistics systemStatistics = systemStatisticsUtil.getSystemStatistics(msgContext
                        .getConfigurationContext().getAxisConfiguration());

                if (msgContext.getAxisOperation() != null) {
                    OperationStatistics operationStatistics = systemStatisticsUtil.getOperationStatistics(
                            msgContext.getAxisOperation());
                    if (operationStatistics.getRequestCount() == 0) {
                        return InvocationResponse.CONTINUE;
                    }
                }//In very rare cases msgContext.getAxisOperation() becomes null, then we can't get statistics.
                else {
                    return InvocationResponse.CONTINUE;
                }

                Collection<ServiceStatisticData> latestServiceStats = updateAndGetLatestServiceStatistics(
                        systemStatisticsUtil,
                        countData,
                        msgContext);
                Collection<OperationStatisticData> latestOperationStats = updateAndGetLatestOperationStatistics(
                        systemStatisticsUtil,
                        countData,
                        msgContext);

                int lastCount = countData.getSystemCount();
                // Current hit count for system
                int currentCount = systemStatistics.getRequestCount();


                if (currentCount - lastCount > eventingConfigData.getSystemRequestCountThreshold()) {

                    countData.setSystemCount(currentCount);
View Full Code Here

Examples of org.wso2.carbon.statistics.services.util.SystemStatistics

* as well as other components.
*/
public class SystemStatisticsUtil {

     public SystemStatistics getSystemStatistics(AxisConfiguration axisConfig) throws AxisFault{
        SystemStatistics systemStatistics = new SystemStatistics();
        systemStatistics.update(axisConfig);
        return systemStatistics;
    }
View Full Code Here

Examples of org.wso2.carbon.statistics.services.util.SystemStatistics

        if(Util.getSystemStatisticsUtil()==null){

            PrivilegedCarbonContext.destroyCurrentContext();
            return InvocationResponse.CONTINUE;
        }
        SystemStatistics systemStatistics = Util.getSystemStatisticsUtil().getSystemStatistics(messageContext);
       
        int tenantId = MultitenantConstants.INVALID_TENANT_ID;
        tenantId = CarbonContext.getCurrentContext().getTenantId();

        if(tenantId == MultitenantConstants.INVALID_TENANT_ID ||
View Full Code Here

Examples of org.wso2.carbon.statistics.services.util.SystemStatistics

        if(Util.getSystemStatisticsUtil()==null){
            return InvocationResponse.CONTINUE;
        }

        SystemStatistics systemStatistics = Util.getSystemStatisticsUtil().getSystemStatistics(messageContext);

        int tenantId = MultitenantConstants.INVALID_TENANT_ID;
        tenantId = CarbonContext.getCurrentContext().getTenantId();

        if(tenantId == MultitenantConstants.INVALID_TENANT_ID ||
View Full Code Here

Examples of org.wso2.carbon.statistics.stub.types.carbon.SystemStatistics

    public StatisticsDO pullDataInternal(ServerDO server) throws BAMException, RemoteException {
        String sessionCookie = ClientAuthHandler.getClientAuthHandler().getSessionString(server);
        String serverUrl = server.getServerURL();
        StatisticsAdminClient client = new StatisticsAdminClient(serverUrl, sessionCookie);
        SystemStatistics sysStatistics = client.getSystemStatistics();
        ServerStatisticsDO statisticsDO = new ServerStatisticsDO();
        statisticsDO.setServerID(server.getId());
        statisticsDO.setServerURL(serverUrl);

        //TODO Where should we set the timestamp?
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.