Package org.jivesoftware.openfire.stats

Examples of org.jivesoftware.openfire.stats.Statistic


    /**
     * Tracks the total number of packets both incoming and outgoing in the server.
     */
    private void addPacketStatistic() {
        // Register a statistic.
        Statistic packetTrafficStatistic = new i18nStatistic(TRAFFIC_KEY, "monitoring", Statistic.Type.rate) {
            public double sample() {
                return packetCount.getAndSet(0);
            }

            public boolean isPartialSample() {
View Full Code Here


    }

    private StatDefinition createDefintion(String key) {
        StatDefinition def = definitionMap.get(key);
        if (def == null) {
            Statistic statistic = statsManager.getStatistic(key);
            String statGroup = statsManager.getMultistatGroup(key);
            try {
                def = new DefaultStatDefinition(statGroup != null ? statGroup : key, key, statistic);

                // If the definition is a part of a group check to see all defiintions have been
View Full Code Here

    public void run() {
        samples = new HashMap<String, Double>();
        for (Map.Entry<String, Statistic> statisticEntry : StatisticsManager.getInstance().getAllStatistics()) {
            String key = statisticEntry.getKey();
            Statistic statistic = statisticEntry.getValue();
            // Only sample statistics that keep info of the cluster node and not the entire cluster
            if (statistic.isPartialSample()) {
                double statSample = sampleStat(key, statistic);
                // Store sample result
                samples.put(key, statSample);
            }
        }
View Full Code Here

TOP

Related Classes of org.jivesoftware.openfire.stats.Statistic

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.