Package tigase.db.beans

## Class MDPoolBeanWithStatistics<S extends Repository,​T extends MDPoolConfigBean<S,​T>>

- java.lang.Object
- - tigase.db.beans.MDPoolBean<S,​T>
  - - tigase.db.beans.MDPoolBeanWithStatistics<S,​T>

- All Implemented Interfaces:
    `RegistrarBean`, `RegistrarBeanWithDefaultBeanClass`, `ComponentStatisticsProvider`, `StatisticsProviderIfc`
  Direct Known Subclasses:
    `AuthRepositoryMDImpl`, `UserRepositoryMDImpl`

      public abstract class MDPoolBeanWithStatistics<S extends Repository,​T extends MDPoolConfigBean<S,​T>>
      extends MDPoolBean<S,​T>
      implements ComponentStatisticsProvider

  Class extends MDPoolBean class by adding support for statistics gathering for every managed repository.
  Created by andrzej on 14.12.2016.

- - ### Field Summary

    - ### Fields inherited from class tigase.db.beans.MDPoolBean

      `POOL_CLASS, POOL_SIZE, REPO_CLASS, REPO_URI`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MDPoolBeanWithStatistics​(java.lang.Class<S> repoClazz)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addRepo​(java.lang.String name, S repo)` | Method called to add repo instance for domain
    `void` | `everyHour()` |
    `void` | `everyMinute()` |
    `void` | `everySecond()` |
    `S` | `getDefaultRepository()` |
    `java.util.Collection<java.lang.String>` | `getDomainsList()` |
    `S` | `getRepo​(java.lang.String domain)` |
    `void` | `getStatistics​(java.lang.String compName, StatisticsList list)` |
    `S` | `removeRepo​(java.lang.String domain)` | Method called to remove repo instance for domain
    `java.util.stream.Stream<S>` | `repositoriesStream()` |
    `void` | `setDefault​(S repo)` | Method called to set default repo instance.
    `void` | `setStatisticsEnabled​(boolean value)` |
    `void` | `wrapInProxy​(java.lang.String name, S repo)` |

    - ### Methods inherited from class tigase.db.beans.MDPoolBean

      `getConfigClass, getDefaultAlias, getName, register, registerConfigBean, unregister`

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

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

    - ### Methods inherited from interface tigase.stats.ComponentStatisticsProvider

      `belongsTo`

    - ### Methods inherited from interface tigase.kernel.beans.RegistrarBeanWithDefaultBeanClass

      `getDefaultBeanClass`

- - ### Constructor Detail

    - #### MDPoolBeanWithStatistics

          public MDPoolBeanWithStatistics​(java.lang.Class<S> repoClazz)

  - ### Method Detail

    - #### addRepo

          public void addRepo​(java.lang.String name,
                              S repo)

      Description copied from class: `MDPoolBean`
      Method called to add repo instance for domain
      Specified by:
        `addRepo` in class `MDPoolBean<S extends Repository,​T extends MDPoolConfigBean<S,​T>>`

    - #### removeRepo

          public S removeRepo​(java.lang.String domain)

      Description copied from class: `MDPoolBean`
      Method called to remove repo instance for domain
      Specified by:
        `removeRepo` in class `MDPoolBean<S extends Repository,​T extends MDPoolConfigBean<S,​T>>`
      Returns:
        removed instance of repo

    - #### getDomainsList

          public java.util.Collection<java.lang.String> getDomainsList()

    - #### getDefaultRepository

          public S getDefaultRepository()

    - #### repositoriesStream

          public java.util.stream.Stream<S> repositoriesStream()

    - #### everyHour

          public void everyHour()

      Specified by:
        `everyHour` in interface `ComponentStatisticsProvider`

    - #### everyMinute

          public void everyMinute()

      Specified by:
        `everyMinute` in interface `ComponentStatisticsProvider`

    - #### everySecond

          public void everySecond()

      Specified by:
        `everySecond` in interface `ComponentStatisticsProvider`

    - #### setDefault

          public void setDefault​(S repo)

      Description copied from class: `MDPoolBean`
      Method called to set default repo instance.
      Specified by:
        `setDefault` in class `MDPoolBean<S extends Repository,​T extends MDPoolConfigBean<S,​T>>`
      Parameters:
        `repo` - instance of repo

    - #### getStatistics

          public void getStatistics​(java.lang.String compName,
                                    StatisticsList list)

      Specified by:
        `getStatistics` in interface `StatisticsProviderIfc`

    - #### setStatisticsEnabled

          public void setStatisticsEnabled​(boolean value)

    - #### getRepo

          public S getRepo​(java.lang.String domain)

    - #### wrapInProxy

          public void wrapInProxy​(java.lang.String name,
                                  S repo)