Package org.wso2.carbon.bam.data.publisher.activity.service

Examples of org.wso2.carbon.bam.data.publisher.activity.service.Counter.increment()


                    .getConfigurationContext()
                    .getProperty(
                            ClientStatisticsPublisherConstants.BAM_USER_DEFINED_OUT_OPERATION_COUNTER_PROPERTY);
            if (outOperationCountObj != null) {
                if (outOperationCountObj instanceof Counter) {
                    counter.increment(((Counter) outOperationCountObj).getCount());
                }
            } else {
                counter.increment();
                msgContext
                        .getConfigurationContext()
View Full Code Here


            if (outOperationCountObj != null) {
                if (outOperationCountObj instanceof Counter) {
                    counter.increment(((Counter) outOperationCountObj).getCount());
                }
            } else {
                counter.increment();
                msgContext
                        .getConfigurationContext()
                        .setProperty(
                                ClientStatisticsPublisherConstants.BAM_USER_DEFINED_OUT_OPERATION_COUNTER_PROPERTY,
                                counter);
View Full Code Here

                    .getProperty(
                            ClientStatisticsPublisherConstants.BAM_USER_DEFINED_IN_OPERATION_COUNTER_PROPERTY);

            if (inOperationCountObj != null) {
                if (inOperationCountObj instanceof Counter) {
                    counter.increment(((Counter) inOperationCountObj).getCount());
                }
            } else {

                counter.increment();
                msgContext
View Full Code Here

                if (inOperationCountObj instanceof Counter) {
                    counter.increment(((Counter) inOperationCountObj).getCount());
                }
            } else {

                counter.increment();
                msgContext
                        .getConfigurationContext()
                        .setProperty(
                                ClientStatisticsPublisherConstants.BAM_USER_DEFINED_IN_OPERATION_COUNTER_PROPERTY,
                                counter);
View Full Code Here

                    .getProperty(
                            ClientStatisticsPublisherConstants.BAM_USER_DEFINED_SERVICE_REQUEST_COUNTER_PROPERTY);

            if (serviceCountObj != null) {
                if (serviceCountObj instanceof Counter) {
                    counter.increment(((Counter) serviceCountObj).getCount());
                }
            } else {

                counter.increment();
                msgContext
View Full Code Here

                if (serviceCountObj instanceof Counter) {
                    counter.increment(((Counter) serviceCountObj).getCount());
                }
            } else {

                counter.increment();
                msgContext
                        .getConfigurationContext()
                        .setProperty(
                                ClientStatisticsPublisherConstants.BAM_USER_DEFINED_SERVICE_REQUEST_COUNTER_PROPERTY,
                                counter);
View Full Code Here

        Object globalResponseCountObj = msgContext.getConfigurationContext().getProperty(
                ClientStatisticsPublisherConstants.BAM_USER_DEFINED_GLOBAL_RESPONSE_COUNTER_PROPERTY);

        if (globalResponseCountObj != null) {
            if (globalResponseCountObj instanceof Counter) {
                counter.increment(((Counter) globalResponseCountObj).getCount());
            }
        } else {
            log
                    .warn(ClientStatisticsPublisherConstants.BAM_USER_DEFINED_GLOBAL_RESPONSE_COUNTER_PROPERTY
                            + " is null");
View Full Code Here

        Object globalrequestCountObj = msgContext.getConfigurationContext()
                .getProperty(
                ClientStatisticsPublisherConstants.BAM_USER_DEFINED_GLOBAL_REQUEST_COUNTER_PROPERTY);
        if (globalrequestCountObj != null) {
            if (globalrequestCountObj instanceof Counter) {
            counter.increment(((Counter) globalrequestCountObj).getCount());
        }
        }
        return InvocationResponse.CONTINUE;
    }
}
View Full Code Here

    private void beginDBQueryLog(int level) {
        if (dbQueryLog.isDebugEnabled()) {
            StackTraceElement traceElement = Thread.currentThread().getStackTrace()[level];
            if (traceElement.getClassName().equals(this.getClass().getCanonicalName())) {
                StatisticsRecord statisticsRecord = DBQueryStatisticsLog.getStatisticsRecord();
                if (statisticsRecord.increment() == 0) {
                    DBQueryStatisticsLog.clearStatisticsRecord();
                    statisticsRecord = DBQueryStatisticsLog.getStatisticsRecord();
                    statisticsRecord.increment();
                    statisticsRecord.setOperation(traceElement.getMethodName());
                }
View Full Code Here

            if (traceElement.getClassName().equals(this.getClass().getCanonicalName())) {
                StatisticsRecord statisticsRecord = DBQueryStatisticsLog.getStatisticsRecord();
                if (statisticsRecord.increment() == 0) {
                    DBQueryStatisticsLog.clearStatisticsRecord();
                    statisticsRecord = DBQueryStatisticsLog.getStatisticsRecord();
                    statisticsRecord.increment();
                    statisticsRecord.setOperation(traceElement.getMethodName());
                }
            }
        }
    }
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.