tigase.stats

## Class CounterDataLogger

- java.lang.Object
- - tigase.stats.CounterDataLogger

- All Implemented Interfaces:
    StatisticsArchivizerIfc

      public class CounterDataLogger
      extends Object
      implements StatisticsArchivizerIfc

  Created: Apr 20, 2010 6:39:05 PM
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `BOSH_CONNS_COL` SQL INT UNSIGNED
    `static String` | `C2S_CONNS_COL` SQL INT UNSIGNED
    `static String` | `C2S_PACKETS_COL` SQL BIGINT UNSIGNED
    `static String` | `CPU_USAGE_COL` SQL float UNSIGNED
    `static String` | `DB_URL_PROP_KEY` Field description
    `static String` | `EXT_PACKETS_COL` SQL BIGINT UNSIGNED
    `static String` | `IQS_COL` SQL BIGINT UNSIGNED
    `static String` | `MEM_USAGE_COL` SQL float UNSIGNED
    `static String` | `MESSAGES_COL` SQL BIGINT UNSIGNED
    `static String` | `MUC_PACKETS_COL` SQL BIGINT UNSIGNED
    `static String` | `PRESENCES_COL` SQL BIGINT UNSIGNED
    `static String` | `PUBSUB_PACKETS_COL` SQL BIGINT UNSIGNED
    `static String` | `REGISTERED_COL` SQL BIGINT UNSIGNED
    `static String` | `S2S_CONNS_COL` SQL INT UNSIGNED
    `static String` | `S2S_PACKETS_COL` SQL BIGINT UNSIGNED
    `static String` | `SM_PACKETS_COL` SQL BIGINT UNSIGNED
    `static String` | `STATS_TABLE` Field description
    `static String` | `UPTIME_COL` SQL BIGINT
    `static String` | `VHOSTS_COL` SQL INT UNSIGNED

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CounterDataLogger()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addStatsLogEntry(float cpu_usage, float mem_usage, long uptime, int vhosts, long sm_packets, long muc_packets, long pubsub_packets, long c2s_packets, long s2s_packets, long ext_packets, long presences, long messages, long iqs, long registered, int c2s_conns, int s2s_conns, int bosh_conns)` Method description
    `void` | `execute(StatisticsProvider sp)` Method description
    `void` | `init(Map<String,Object> archivizerConf)` Method description
    `void` | `initRepository(String conn_str, Map<String,String> map)` Method description
    `void` | `release()` Method description

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

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

- - ### Field Detail

    - #### DB_URL_PROP_KEY

          public static final String DB_URL_PROP_KEY

      Field description
      See Also:
        Constant Field Values

    - #### STATS_TABLE

          public static final String STATS_TABLE

      Field description
      See Also:
        Constant Field Values

    - #### CPU_USAGE_COL

          public static final String CPU_USAGE_COL

      SQL float UNSIGNED
      See Also:
        Constant Field Values

    - #### MEM_USAGE_COL

          public static final String MEM_USAGE_COL

      SQL float UNSIGNED
      See Also:
        Constant Field Values

    - #### UPTIME_COL

          public static final String UPTIME_COL

      SQL BIGINT
      See Also:
        Constant Field Values

    - #### VHOSTS_COL

          public static final String VHOSTS_COL

      SQL INT UNSIGNED
      See Also:
        Constant Field Values

    - #### SM_PACKETS_COL

          public static final String SM_PACKETS_COL

      SQL BIGINT UNSIGNED
      See Also:
        Constant Field Values

    - #### MUC_PACKETS_COL

          public static final String MUC_PACKETS_COL

      SQL BIGINT UNSIGNED
      See Also:
        Constant Field Values

    - #### PUBSUB_PACKETS_COL

          public static final String PUBSUB_PACKETS_COL

      SQL BIGINT UNSIGNED
      See Also:
        Constant Field Values

    - #### C2S_PACKETS_COL

          public static final String C2S_PACKETS_COL

      SQL BIGINT UNSIGNED
      See Also:
        Constant Field Values

    - #### S2S_PACKETS_COL

          public static final String S2S_PACKETS_COL

      SQL BIGINT UNSIGNED
      See Also:
        Constant Field Values

    - #### EXT_PACKETS_COL

          public static final String EXT_PACKETS_COL

      SQL BIGINT UNSIGNED
      See Also:
        Constant Field Values

    - #### C2S_CONNS_COL

          public static final String C2S_CONNS_COL

      SQL INT UNSIGNED
      See Also:
        Constant Field Values

    - #### S2S_CONNS_COL

          public static final String S2S_CONNS_COL

      SQL INT UNSIGNED
      See Also:
        Constant Field Values

    - #### BOSH_CONNS_COL

          public static final String BOSH_CONNS_COL

      SQL INT UNSIGNED
      See Also:
        Constant Field Values

    - #### PRESENCES_COL

          public static final String PRESENCES_COL

      SQL BIGINT UNSIGNED
      See Also:
        Constant Field Values

    - #### MESSAGES_COL

          public static final String MESSAGES_COL

      SQL BIGINT UNSIGNED
      See Also:
        Constant Field Values

    - #### IQS_COL

          public static final String IQS_COL

      SQL BIGINT UNSIGNED
      See Also:
        Constant Field Values

    - #### REGISTERED_COL

          public static final String REGISTERED_COL

      SQL BIGINT UNSIGNED
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CounterDataLogger

          public CounterDataLogger()

  - ### Method Detail

    - #### addStatsLogEntry

          public void addStatsLogEntry(float cpu_usage,
                              float mem_usage,
                              long uptime,
                              int vhosts,
                              long sm_packets,
                              long muc_packets,
                              long pubsub_packets,
                              long c2s_packets,
                              long s2s_packets,
                              long ext_packets,
                              long presences,
                              long messages,
                              long iqs,
                              long registered,
                              int c2s_conns,
                              int s2s_conns,
                              int bosh_conns)

      Method description
      Parameters:
        `cpu_usage` -
        `mem_usage` -
        `uptime` -
        `vhosts` -
        `sm_packets` -
        `muc_packets` -
        `pubsub_packets` -
        `c2s_packets` -
        `s2s_packets` -
        `ext_packets` -
        `presences` -
        `messages` -
        `iqs` -
        `registered` -
        `c2s_conns` -
        `s2s_conns` -
        `bosh_conns` -

    - #### execute

          public void execute(StatisticsProvider sp)

      Method description
      Specified by:
        `execute` in interface `StatisticsArchivizerIfc`
      Parameters:
        `sp` -

    - #### init

          public void init(Map<String,Object> archivizerConf)

      Method description
      Specified by:
        `init` in interface `StatisticsArchivizerIfc`
      Parameters:
        `archivizerConf` -

    - #### initRepository

          public void initRepository(String conn_str,
                            Map<String,String> map)
                              throws SQLException,
                                     ClassNotFoundException,
                                     IllegalAccessException,
                                     InstantiationException,
                                     DBInitException

      Method description
      Parameters:
        `conn_str` -
        `map` -
      Throws:
        `SQLException`
        `ClassNotFoundException`
        `IllegalAccessException`
        `InstantiationException`
        `DBInitException`

    - #### release

          public void release()

      Method description
      Specified by:
        `release` in interface `StatisticsArchivizerIfc`

Copyright © 2013 Tigase. All rights reserved.