Package tigase.stats

## Class StatisticsProvider

- java.lang.Object
- - javax.management.StandardMBean
  - - tigase.stats.StatisticsProvider

- All Implemented Interfaces:
    `javax.management.DynamicMBean`, `javax.management.MBeanRegistration`, `StatisticsProviderMBean`

      public class StatisticsProvider
      extends javax.management.StandardMBean
      implements StatisticsProviderMBean

  Class StatisticsProvider
  Author:
    kobit

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `StatisticsProvider​(StatisticsCollector theRef, int historySize, long updateInterval, int highMemoryLevel)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.util.Map<java.lang.String,​java.lang.String>` | `getAllStats​(int level)` | Operation exposed for management
    `int` | `getCLIOQueueSize()` |
    `float[]` | `getCLPacketsPerSecHistory()` |
    `int` | `getCLQueueSize()` |
    `int` | `getClusterCacheSize()` |
    `float` | `getClusterCompressionRatio()` |
    `long` | `getClusterNetworkBytes()` |
    `float` | `getClusterNetworkBytesPerSecond()` |
    `long` | `getClusterPackets()` |
    `float` | `getClusterPacketsPerSec()` |
    `int` | `getCompConnections​(java.lang.String comp)` |
    `long` | `getCompIqs​(java.lang.String comp)` |
    `long` | `getCompMessages​(java.lang.String comp)` |
    `protected java.util.Set<java.lang.String>` | `getCompNames()` |
    `java.util.List<java.lang.String>` | `getComponentsNames()` | Get Attribute exposed for management
    `java.util.Map<java.lang.String,​java.lang.String>` | `getComponentStats​(java.lang.String compName, int level)` | Operation exposed for management
    `long` | `getCompPackets​(java.lang.String comp)` |
    `long` | `getCompPresences​(java.lang.String comp)` |
    `int` | `getConnectionsNumber()` |
    `int[]` | `getConnectionsNumberHistory()` |
    `int` | `getCPUsNumber()` |
    `float` | `getCPUUsage()` |
    `float[]` | `getCPUUsageHistory()` |
    `java.util.Map<java.lang.String,​java.lang.Object>` | `getCurStats​(java.lang.String[] statsKeys)` |
    `protected java.lang.String` | `getDescription​(javax.management.MBeanAttributeInfo info)` |
    `protected java.lang.String` | `getDescription​(javax.management.MBeanInfo info)` |
    `protected java.lang.String` | `getDescription​(javax.management.MBeanOperationInfo info)` |
    `protected java.lang.String` | `getDescription​(javax.management.MBeanOperationInfo op, javax.management.MBeanParameterInfo param, int sequence)` |
    `long` | `getDirectMemUsed()` |
    `long[]` | `getDirectMemUsedHistory()` |
    `float` | `getHeapMemUsage()` |
    `float[]` | `getHeapUsageHistory()` |
    `long` | `getIQAuthNumber()` |
    `long` | `getIQOtherNumber()` |
    `float` | `getIQOtherNumberPerSec()` |
    `javax.management.MBeanInfo` | `getMBeanInfo()` |
    `long` | `getMessagesNumber()` |
    `float` | `getMessagesNumberPerSec()` |
    `java.lang.String` | `getName()` |
    `float` | `getNonHeapMemUsage()` |
    `javax.management.MBeanNotificationInfo[]` | `getNotificationInfo()` |
    `protected java.lang.String` | `getParameterName​(javax.management.MBeanOperationInfo op, javax.management.MBeanParameterInfo param, int sequence)` |
    `long` | `getPresencesNumber()` |
    `float` | `getPresencesNumberPerSec()` |
    `long` | `getProcesCPUTime()` |
    `long` | `getQueueOverflow()` |
    `int` | `getQueueSize()` |
    `long` | `getRegistered()` |
    `int` | `getServerConnections()` |
    `int[]` | `getServerConnectionsHistory()` |
    `long` | `getSMPacketsNumber()` |
    `float` | `getSMPacketsNumberPerSec()` |
    `float[]` | `getSMPacketsPerSecHistory()` |
    `int` | `getSMQueueSize()` |
    `float` | `getStats​(java.lang.String cmp_name, java.lang.String stat, float def)` |
    `int` | `getStats​(java.lang.String cmp_name, java.lang.String stat, int def)` |
    `long` | `getStats​(java.lang.String cmp_name, java.lang.String stat, long def)` |
    `java.lang.String` | `getStats​(java.lang.String cmp_name, java.lang.String stat, java.lang.String def)` |
    `java.util.Map<java.lang.String,​java.util.LinkedList<java.lang.Object>>` | `getStatsHistory​(java.lang.String[] statsKeys)` |
    `java.lang.String` | `getSystemDetails()` |
    `long` | `getUptime()` |
    `void` | `stop()` |

    - ### Methods inherited from class javax.management.StandardMBean

      `cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInterface, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StatisticsProvider

          public StatisticsProvider​(StatisticsCollector theRef,
                                    int historySize,
                                    long updateInterval,
                                    int highMemoryLevel)
                             throws javax.management.NotCompliantMBeanException

      Throws:
        `javax.management.NotCompliantMBeanException`

  - ### Method Detail

    - #### stop

          public void stop()

    - #### getAllStats

          public java.util.Map<java.lang.String,​java.lang.String> getAllStats​(int level)

      Description copied from interface: `StatisticsProviderMBean`
      Operation exposed for management
      Specified by:
        `getAllStats` in interface `StatisticsProviderMBean`
      Parameters:
        `level` - Statistics level, 0 - All, 500 - Medium, 800 - Minimal
      Returns:
        `java.util.Map<String, String>`

    - #### getCLIOQueueSize

          public int getCLIOQueueSize()

      Specified by:
        `getCLIOQueueSize` in interface `StatisticsProviderMBean`

    - #### getCLPacketsPerSecHistory

          public float[] getCLPacketsPerSecHistory()

      Specified by:
        `getCLPacketsPerSecHistory` in interface `StatisticsProviderMBean`

    - #### getCLQueueSize

          public int getCLQueueSize()

      Specified by:
        `getCLQueueSize` in interface `StatisticsProviderMBean`

    - #### getClusterCacheSize

          public int getClusterCacheSize()

      Specified by:
        `getClusterCacheSize` in interface `StatisticsProviderMBean`

    - #### getClusterCompressionRatio

          public float getClusterCompressionRatio()

      Specified by:
        `getClusterCompressionRatio` in interface `StatisticsProviderMBean`

    - #### getClusterNetworkBytes

          public long getClusterNetworkBytes()

      Specified by:
        `getClusterNetworkBytes` in interface `StatisticsProviderMBean`

    - #### getClusterNetworkBytesPerSecond

          public float getClusterNetworkBytesPerSecond()

      Specified by:
        `getClusterNetworkBytesPerSecond` in interface `StatisticsProviderMBean`

    - #### getClusterPackets

          public long getClusterPackets()

      Specified by:
        `getClusterPackets` in interface `StatisticsProviderMBean`

    - #### getClusterPacketsPerSec

          public float getClusterPacketsPerSec()

      Specified by:
        `getClusterPacketsPerSec` in interface `StatisticsProviderMBean`

    - #### getCompConnections

          public int getCompConnections​(java.lang.String comp)

    - #### getCompIqs

          public long getCompIqs​(java.lang.String comp)

    - #### getCompMessages

          public long getCompMessages​(java.lang.String comp)

    - #### getComponentsNames

          public java.util.List<java.lang.String> getComponentsNames()

      Description copied from interface: `StatisticsProviderMBean`
      Get Attribute exposed for management
      Specified by:
        `getComponentsNames` in interface `StatisticsProviderMBean`
      Returns:
        a value of `List<String>`

    - #### getComponentStats

          public java.util.Map<java.lang.String,​java.lang.String> getComponentStats​(java.lang.String compName,
                                                                                          int level)

      Description copied from interface: `StatisticsProviderMBean`
      Operation exposed for management
      Specified by:
        `getComponentStats` in interface `StatisticsProviderMBean`
      Parameters:
        `compName` - The component name to provide statistics for
        `level` - Statistics level, 0 - All, 500 - Medium, 800 - Minimal
      Returns:
        `java.util.Map<String, String>`

    - #### getCompPackets

          public long getCompPackets​(java.lang.String comp)

    - #### getCompPresences

          public long getCompPresences​(java.lang.String comp)

    - #### getConnectionsNumber

          public int getConnectionsNumber()

      Specified by:
        `getConnectionsNumber` in interface `StatisticsProviderMBean`

    - #### getConnectionsNumberHistory

          public int[] getConnectionsNumberHistory()

      Specified by:
        `getConnectionsNumberHistory` in interface `StatisticsProviderMBean`

    - #### getCPUsNumber

          public int getCPUsNumber()

      Specified by:
        `getCPUsNumber` in interface `StatisticsProviderMBean`

    - #### getCPUUsage

          public float getCPUUsage()

      Specified by:
        `getCPUUsage` in interface `StatisticsProviderMBean`

    - #### getCPUUsageHistory

          public float[] getCPUUsageHistory()

      Specified by:
        `getCPUUsageHistory` in interface `StatisticsProviderMBean`

    - #### getCurStats

          public java.util.Map<java.lang.String,​java.lang.Object> getCurStats​(java.lang.String[] statsKeys)

      Specified by:
        `getCurStats` in interface `StatisticsProviderMBean`

    - #### getDirectMemUsed

          public long getDirectMemUsed()

      Specified by:
        `getDirectMemUsed` in interface `StatisticsProviderMBean`

    - #### getDirectMemUsedHistory

          public long[] getDirectMemUsedHistory()

      Specified by:
        `getDirectMemUsedHistory` in interface `StatisticsProviderMBean`

    - #### getHeapMemUsage

          public float getHeapMemUsage()

      Specified by:
        `getHeapMemUsage` in interface `StatisticsProviderMBean`

    - #### getHeapUsageHistory

          public float[] getHeapUsageHistory()

      Specified by:
        `getHeapUsageHistory` in interface `StatisticsProviderMBean`

    - #### getIQAuthNumber

          public long getIQAuthNumber()

      Specified by:
        `getIQAuthNumber` in interface `StatisticsProviderMBean`

    - #### getIQOtherNumber

          public long getIQOtherNumber()

      Specified by:
        `getIQOtherNumber` in interface `StatisticsProviderMBean`

    - #### getIQOtherNumberPerSec

          public float getIQOtherNumberPerSec()

      Specified by:
        `getIQOtherNumberPerSec` in interface `StatisticsProviderMBean`

    - #### getMBeanInfo

          public javax.management.MBeanInfo getMBeanInfo()

      Specified by:
        `getMBeanInfo` in interface `javax.management.DynamicMBean`
      Overrides:
        `getMBeanInfo` in class `javax.management.StandardMBean`

    - #### getMessagesNumber

          public long getMessagesNumber()

      Specified by:
        `getMessagesNumber` in interface `StatisticsProviderMBean`

    - #### getMessagesNumberPerSec

          public float getMessagesNumberPerSec()

      Specified by:
        `getMessagesNumberPerSec` in interface `StatisticsProviderMBean`

    - #### getName

          public java.lang.String getName()

      Specified by:
        `getName` in interface `StatisticsProviderMBean`

    - #### getNonHeapMemUsage

          public float getNonHeapMemUsage()

      Specified by:
        `getNonHeapMemUsage` in interface `StatisticsProviderMBean`

    - #### getNotificationInfo

          public javax.management.MBeanNotificationInfo[] getNotificationInfo()

    - #### getPresencesNumber

          public long getPresencesNumber()

      Specified by:
        `getPresencesNumber` in interface `StatisticsProviderMBean`

    - #### getPresencesNumberPerSec

          public float getPresencesNumberPerSec()

      Specified by:
        `getPresencesNumberPerSec` in interface `StatisticsProviderMBean`

    - #### getProcesCPUTime

          public long getProcesCPUTime()

      Specified by:
        `getProcesCPUTime` in interface `StatisticsProviderMBean`

    - #### getQueueOverflow

          public long getQueueOverflow()

      Specified by:
        `getQueueOverflow` in interface `StatisticsProviderMBean`

    - #### getQueueSize

          public int getQueueSize()

      Specified by:
        `getQueueSize` in interface `StatisticsProviderMBean`

    - #### getRegistered

          public long getRegistered()

    - #### getServerConnections

          public int getServerConnections()

      Specified by:
        `getServerConnections` in interface `StatisticsProviderMBean`

    - #### getServerConnectionsHistory

          public int[] getServerConnectionsHistory()

      Specified by:
        `getServerConnectionsHistory` in interface `StatisticsProviderMBean`

    - #### getSMPacketsNumber

          public long getSMPacketsNumber()

      Specified by:
        `getSMPacketsNumber` in interface `StatisticsProviderMBean`

    - #### getSMPacketsNumberPerSec

          public float getSMPacketsNumberPerSec()

      Specified by:
        `getSMPacketsNumberPerSec` in interface `StatisticsProviderMBean`

    - #### getSMPacketsPerSecHistory

          public float[] getSMPacketsPerSecHistory()

      Specified by:
        `getSMPacketsPerSecHistory` in interface `StatisticsProviderMBean`

    - #### getSMQueueSize

          public int getSMQueueSize()

      Specified by:
        `getSMQueueSize` in interface `StatisticsProviderMBean`

    - #### getStats

          public long getStats​(java.lang.String cmp_name,
                               java.lang.String stat,
                               long def)

    - #### getStats

          public float getStats​(java.lang.String cmp_name,
                                java.lang.String stat,
                                float def)

    - #### getStats

          public java.lang.String getStats​(java.lang.String cmp_name,
                                           java.lang.String stat,
                                           java.lang.String def)

    - #### getStats

          public int getStats​(java.lang.String cmp_name,
                              java.lang.String stat,
                              int def)

    - #### getStatsHistory

          public java.util.Map<java.lang.String,​java.util.LinkedList<java.lang.Object>> getStatsHistory​(java.lang.String[] statsKeys)

      Specified by:
        `getStatsHistory` in interface `StatisticsProviderMBean`

    - #### getSystemDetails

          public java.lang.String getSystemDetails()

      Specified by:
        `getSystemDetails` in interface `StatisticsProviderMBean`

    - #### getUptime

          public long getUptime()

      Specified by:
        `getUptime` in interface `StatisticsProviderMBean`

    - #### getDescription

          protected java.lang.String getDescription​(javax.management.MBeanInfo info)

      Overrides:
        `getDescription` in class `javax.management.StandardMBean`

    - #### getDescription

          protected java.lang.String getDescription​(javax.management.MBeanAttributeInfo info)

      Overrides:
        `getDescription` in class `javax.management.StandardMBean`

    - #### getDescription

          protected java.lang.String getDescription​(javax.management.MBeanOperationInfo op,
                                                    javax.management.MBeanParameterInfo param,
                                                    int sequence)

      Overrides:
        `getDescription` in class `javax.management.StandardMBean`

    - #### getDescription

          protected java.lang.String getDescription​(javax.management.MBeanOperationInfo info)

      Overrides:
        `getDescription` in class `javax.management.StandardMBean`

    - #### getParameterName

          protected java.lang.String getParameterName​(javax.management.MBeanOperationInfo op,
                                                      javax.management.MBeanParameterInfo param,
                                                      int sequence)

      Overrides:
        `getParameterName` in class `javax.management.StandardMBean`

    - #### getCompNames

          protected java.util.Set<java.lang.String> getCompNames()