Package tigase.stats

## Class CounterDataArchivizer

- java.lang.Object
- - tigase.stats.CounterDataArchivizer

- All Implemented Interfaces:
    `ConfigurationChangedAware`, `Initializable`, `StatisticsArchivizerIfc`

      public class CounterDataArchivizer
      extends java.lang.Object
      implements StatisticsArchivizerIfc, ConfigurationChangedAware, Initializable

  Created: Mar 25, 2010 8:55:11 PM
  Author:
    Artur Hefczyc

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `DB_URL_PROP_KEY` |
    `static java.lang.String` | `KEY_FIELD_PROP_KEY` |
    `static java.lang.String` | `TABLE_NAME_PROP_KEY` |
    `static java.lang.String` | `VAL_FIELD_PROP_KEY` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CounterDataArchivizer()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `beanConfigurationChanged​(java.util.Collection<java.lang.String> changedFields)` | Method called when configuration was applied to bean.
    `void` | `execute​(StatisticsProvider sp)` |
    `long` | `getFrequency()` |
    `void` | `initData​(java.lang.String key, java.lang.String value)` |
    `void` | `initialize()` | Method will be called, when bean will be created, configured and ready to use.
    `void` | `initRepository​(java.lang.String conn_str, java.util.Map<java.lang.String,​java.lang.String> params)` |
    `void` | `release()` |
    `void` | `updateData​(java.lang.String key, java.lang.String value)` |

    - ### 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 java.lang.String DB_URL_PROP_KEY

      See Also:
        Constant Field Values

    - #### KEY_FIELD_PROP_KEY

          public static final java.lang.String KEY_FIELD_PROP_KEY

      See Also:
        Constant Field Values

    - #### TABLE_NAME_PROP_KEY

          public static final java.lang.String TABLE_NAME_PROP_KEY

      See Also:
        Constant Field Values

    - #### VAL_FIELD_PROP_KEY

          public static final java.lang.String VAL_FIELD_PROP_KEY

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CounterDataArchivizer

          public CounterDataArchivizer()

  - ### Method Detail

    - #### execute

          public void execute​(StatisticsProvider sp)

      Specified by:
        `execute` in interface `StatisticsArchivizerIfc`

    - #### initData

          public void initData​(java.lang.String key,
                               java.lang.String value)

    - #### initRepository

          public void initRepository​(java.lang.String conn_str,
                                     java.util.Map<java.lang.String,​java.lang.String> params)
                              throws java.sql.SQLException,
                                     java.lang.ClassNotFoundException,
                                     java.lang.InstantiationException,
                                     java.lang.IllegalAccessException,
                                     DBInitException

      Throws:
        `java.sql.SQLException`
        `java.lang.ClassNotFoundException`
        `java.lang.InstantiationException`
        `java.lang.IllegalAccessException`
        `DBInitException`

    - #### release

          public void release()

      Specified by:
        `release` in interface `StatisticsArchivizerIfc`

    - #### updateData

          public void updateData​(java.lang.String key,
                                 java.lang.String value)

    - #### beanConfigurationChanged

          public void beanConfigurationChanged​(java.util.Collection<java.lang.String> changedFields)

      Description copied from interface: `ConfigurationChangedAware`
      Method called when configuration was applied to bean.
      Specified by:
        `beanConfigurationChanged` in interface `ConfigurationChangedAware`
      Parameters:
        `changedFields` - collection of field names which were changed

    - #### getFrequency

          public long getFrequency()

      Specified by:
        `getFrequency` in interface `StatisticsArchivizerIfc`

    - #### initialize

          public void initialize()

      Description copied from interface: `Initializable`
      Method will be called, when bean will be created, configured and ready to use.
      Specified by:
        `initialize` in interface `Initializable`