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
  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
    `protected static String` | `defaultHostname`
    `static String` | `EXT_PACKETS_COL` SQL BIGINT UNSIGNED
    `static String` | `HOSTNAME_COL` SQL VARCHAR(2049)
    `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

    All Methods Instance Methods Concrete 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)`
    `void` | `execute(StatisticsProvider sp)`
    `void` | `init(Map<String,Object> archivizerConf)`
    `void` | `initRepository(String conn_str, Map<String,String> map)` Method initialize repository
    `void` | `release()`

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

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

- - ### Field Detail

    - #### BOSH_CONNS_COL

          public static final String BOSH_CONNS_COL

      SQL INT UNSIGNED
      See Also:
        Constant Field Values

    - #### C2S_CONNS_COL

          public static final String C2S_CONNS_COL

      SQL INT UNSIGNED
      See Also:
        Constant Field Values

    - #### C2S_PACKETS_COL

          public static final String C2S_PACKETS_COL

      SQL BIGINT UNSIGNED
      See Also:
        Constant Field Values

    - #### CPU_USAGE_COL

          public static final String CPU_USAGE_COL

      SQL float UNSIGNED
      See Also:
        Constant Field Values

    - #### DB_URL_PROP_KEY

          public static final String DB_URL_PROP_KEY

      Field description
      See Also:
        Constant Field Values

    - #### EXT_PACKETS_COL

          public static final String EXT_PACKETS_COL

      SQL BIGINT UNSIGNED
      See Also:
        Constant Field Values

    - #### HOSTNAME_COL

          public static final String HOSTNAME_COL

      SQL VARCHAR(2049)
      See Also:
        Constant Field Values

    - #### IQS_COL

          public static final String IQS_COL

      SQL BIGINT UNSIGNED
      See Also:
        Constant Field Values

    - #### MEM_USAGE_COL

          public static final String MEM_USAGE_COL

      SQL float UNSIGNED
      See Also:
        Constant Field Values

    - #### MESSAGES_COL

          public static final String MESSAGES_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

    - #### PRESENCES_COL

          public static final String PRESENCES_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

    - #### S2S_CONNS_COL

          public static final String S2S_CONNS_COL

      SQL INT UNSIGNED
      See Also:
        Constant Field Values

    - #### S2S_PACKETS_COL

          public static final String S2S_PACKETS_COL

      SQL BIGINT UNSIGNED
      See Also:
        Constant Field Values

    - #### SM_PACKETS_COL

          public static final String SM_PACKETS_COL

      SQL BIGINT UNSIGNED
      See Also:
        Constant Field Values

    - #### STATS_TABLE

          public static final String STATS_TABLE

      Field description
      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

    - #### defaultHostname

          protected static String defaultHostname

    - #### 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)

    - #### execute

          public void execute(StatisticsProvider sp)

      Specified by:
        `execute` in interface `StatisticsArchivizerIfc`

    - #### init

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

      Specified by:
        `init` in interface `StatisticsArchivizerIfc`

    - #### initRepository

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

      Method initialize repository
      Parameters:
        `conn_str` - database connection URI
        `map` - map of the additional parameters
      Throws:
        `SQLException`
        `ClassNotFoundException`
        `IllegalAccessException`
        `InstantiationException`
        `DBInitException`

    - #### release

          public void release()

      Specified by:
        `release` in interface `StatisticsArchivizerIfc`

Copyright © 2022 "Tigase, Inc.". All rights reserved.