modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/util/ConnectionsView.java [87:119]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        initCounters(requestSizeCounters);
        initCounters(responseSizeCounters);

        Runnable task = new Runnable() {
            @Override
            public void run() {
                // We only need historical data for the last 15 minutes
                // Therefore no need to keep data older than that...
                if (shortTermDataQueue.size() == 15) {
                    shortTermDataQueue.remove();
                }
                shortTermDataQueue.offer(shortTermOpenedConnections.getAndSet(0));
            }
        };
        // Delay the timer by 1 minute to prevent the task from starting immediately
        scheduler.scheduleAtFixedRate(task, SHORT_DATA_COLLECTION_PERIOD,
                SHORT_DATA_COLLECTION_PERIOD, TimeUnit.SECONDS);

        Runnable longTermCollector = new Runnable() {
            @Override
            public void run() {
                // We only need historical data for the last 24 hours
                // Therefore no need to keep data older than that...
                if (longTermDataQueue.size() == 24 * SAMPLES_PER_HOUR) {
                    longTermDataQueue.remove();
                }
                longTermDataQueue.offer(longTermOpenedConnections.getAndSet(0));
            }
        };
        scheduler.scheduleAtFixedRate(longTermCollector, LONG_DATA_COLLECTION_PERIOD,
                LONG_DATA_COLLECTION_PERIOD, TimeUnit.SECONDS);
        boolean registered = false;
        try {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/passthru/jmx/ConnectionsView.java [78:111]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        initCounters(requestSizeCounters);
        initCounters(responseSizeCounters);

        Runnable task = new Runnable() {
            @Override
            public void run() {
                // We only need historical data for the last 15 minutes
                // Therefore no need to keep data older than that...
                if (shortTermDataQueue.size() == 15) {
                    shortTermDataQueue.remove();
                }
                shortTermDataQueue.offer(shortTermOpenedConnections.getAndSet(0));
            }
        };
        // Delay the timer by 1 minute to prevent the task from starting immediately
        scheduler.scheduleAtFixedRate(task, SHORT_DATA_COLLECTION_PERIOD,
                SHORT_DATA_COLLECTION_PERIOD, TimeUnit.SECONDS);

        Runnable longTermCollector = new Runnable() {
            @Override
            public void run() {
                // We only need historical data for the last 24 hours
                // Therefore no need to keep data older than that...
                if (longTermDataQueue.size() == 24 * SAMPLES_PER_HOUR) {
                    longTermDataQueue.remove();
                }
                longTermDataQueue.offer(longTermOpenedConnections.getAndSet(0));
            }
        };
        scheduler.scheduleAtFixedRate(longTermCollector, LONG_DATA_COLLECTION_PERIOD,
                LONG_DATA_COLLECTION_PERIOD, TimeUnit.SECONDS);

        boolean registered = false;
        try {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



